Image

interface Image

A decoded, ready to display image, the equivalent of the Image of react-native-nitro-image that VisionCamera returns from Photo.toImage, CapturePhotoCallbacks.onPreviewImageAvailable, the preview view's takeSnapshot() and the FrameConverter.

It wraps the platform's native image, available through platform extensions: Image.toBitmap() (an android.graphics.Bitmap) on Android, and Image.toUIImage() (a UIImage) on iOS.

Properties

Link copied to clipboard
abstract val height: Int

The height of this image, in pixels.

Link copied to clipboard
abstract val width: Int

The width of this image, in pixels.

Functions

Link copied to clipboard

Gets the Android Bitmap of this Image.

Link copied to clipboard
fun Image.toUIImage(): UIImage

Gets the UIImage of this Image. Its orientation and mirroring are applied through UIImage.imageOrientation.