Class ImageData
Index
Constructors
Methods
Methods
Static
getDimensions
- get
Dimensions (urls, options?): Promise<{
fulfilled: {
height: number;
url: string;
width: number;
}[];
rejected: {
url: string;
}[];
}> Loads given URLs into image elements returning those that resolved with width & height dimensions. This is useful when the size of an image is necessary before usage.
Parameters
- urls: string | {
url?: string;
} | Iterable<string | {
url?: string;
}, any, any>A list of image URLS to load or object with an
url
property. Optional
options: {
accessor?: string;
warn?: boolean;
}Optional options.
Optional
accessor?: stringAccessor string to access child attribute when
urls
entry contains objects.Optional
warn?: booleanLog debug warnings when a target URL can not be determined; default: false.
Returns Promise<{
fulfilled: {
height: number;
url: string;
width: number;
}[];
rejected: {
url: string;
}[];
}>An object with
fulfilled
andrejected
requests.- urls: string | {
Provides utility functions for retrieving data about images.