Image Ref
Constructors
Properties
Functions
Returns the stored image encoded with the given options.
Marks the cached drawable render as stale so the next draw re-renders the source image. Call this if the underlying image bytes change.
Renders the stored image into a caller-provided mutable ARGB_8888 Bitmap.
Renders the stored image into a caller-provided HardwareBuffer with format HardwareBuffer.RGBA_8888. Combined with Bitmap.wrapHardwareBuffer (API 29+) this enables zero-copy GPU sampling — HWUI imports the buffer as an EGL/Vulkan external image once and samples it directly on subsequent draws.
Saves the stored image with the given options.
If true, the drawable will render the image at the size of its bounds instead of the full image size. This can reduce memory usage and improve performance when rendering large images in small views. If for some reason you need to render the full image size, set this to false. The default is true. Possible cases when you need to render full quality image that might be zoomed later.
Converts the Image Ref to Json representation If serialization mode is REFERENCE effectively calls serialize If serialization mode is BUFFER stores the image inplace in base64 format