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 IImageOptionsBuilder4

interface IImageOptionsBuilder4
Extends IImageOptionsBuilder3 This interface extends IImageOptionsBuilder3 to provide additional configuration options for custom HTTP request headers and YUV decoding preference when loading an IImage.

Methods

void header(Header* header)
Sets or updates a custom HTTP request header. If a header with the given key already exists, its value is replaced. Note: The header key is case-insensitive.

Parameters

header
Header* — Required The Header containing the key and value.

preferJpegDecodeToYuv()

void preferJpegDecodeToYuv(bool preferJpegDecodeToYuv)
Enables or disables decoding JPEG images to YUV planes instead of RGBA, skipping the CPU-side YCbCr-to-RGB color conversion step. The YUV to RGB conversion is deferred to the GPU, which performs it at render time via fragment shader, resulting in reduced decode time and lower memory consumption. This option takes effect only if the JPEG image’s internal color space supports conversion to YUV and the preferred size matches one of the sizes that the codec natively supports. If conditions are not met, the decoder falls back to RGBA automatically. It is disabled by default.

Parameters

preferJpegDecodeToYuv
bool — Required true to prefer YUV decoding, false otherwise.
Last modified on October 29, 2026