wrapped in NativeJSRef. The image data is not transferred over the React
Native Bridge, but it offers functions to manipulate the image. All
functions are executed
async in native.
Eventually, this will change with the introduction of the new React Native architecture including JSI, Fabric, and TurboModules.
Get the height of an image (in pixel).
Get the natural height of an image (in pixel).
Get the natural width of an image (in pixel).
Get the pixel density for this image. The
Get the width of an image (in pixel).
Until explicitly released, an Image will have a reference in memory.
Not calling Image.release can eventually result in an
While this is an
async function, it does not need to be
GC on Android will eventually free the allocated memory.
The Image.scale method of the Image API adds a scaling
transformation horizontally and/or vertically. For instance, a scaling
0.5 results in a unit size of
0.5 pixels; the image is thus
at half the normal size. Similarly, a scaling factor of
the unit size so that one unit becomes two pixels; images are thus at
twice the normal size.
The method will apply the scaling on a copy of the Image and return the scaled Image asynchronously.
|Scaling factor in the horizontal direction. A negative value flips pixels across the vertical axis. A value of |
|Scaling factor in the vertical direction. A negative value flips pixels across the horizontal axis. A value of |