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
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.voidheader(Header*header)
Parameters
header
Header* — Required
The Header containing the key and value.
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.voidpreferJpegDecodeToYuv(boolpreferJpegDecodeToYuv)
Parameters
preferJpegDecodeToYuv
bool — Required
true to prefer YUV decoding, false otherwise.

