Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IImageLoader2

interface IImageLoader2
Extends IImageLoader It extends IImageLoader with additional functionality to extend the functionality of IImageLoader::getImageSize to receive image headers as parameter apart from url of the image.

Methods

getImageSizeWithHeaders()

com.amazon.kepler.uitoolkit.graphics.Size getImageSizeWithHeaders(string uri, Header[] headers)
Gets the dimensions (height and width) of the IImage. If there is a cache hit, the dimensions will be fetched from the cache. Otherwise, it will be fetched from the originating source. Note: This is a synchronous blocking call. If the image is not in the cache, it will fetch from the originating source which may involve a network request. Avoid calling on the UI thread if a cache miss is possible.

Parameters

uri
string — Required URI of the IImage.
headers
Header[] — Required The list of image headers, refer Header

Returns

com.amazon.kepler.uitoolkit.graphics.Size Dimensions of the IImage.
Last modified on October 29, 2026