Search in sources :

Example 6 with ImageDimensions

use of org.reactnative.camera.utils.ImageDimensions in project react-native-camera by lwansbrough.

the class RNFrameFactory method buildFrame.

public static RNFrame buildFrame(Bitmap bitmap) {
    ImageDimensions dimensions = new ImageDimensions(bitmap.getWidth(), bitmap.getHeight());
    InputImage image = InputImage.fromBitmap(bitmap, 0);
    return new RNFrame(image, dimensions);
}
Also used : ImageDimensions(org.reactnative.camera.utils.ImageDimensions) InputImage(com.google.mlkit.vision.common.InputImage)

Aggregations

ImageDimensions (org.reactnative.camera.utils.ImageDimensions)6 Frame (com.google.android.gms.vision.Frame)2 InputImage (com.google.mlkit.vision.common.InputImage)2 ByteBuffer (java.nio.ByteBuffer)2 Face (com.google.android.gms.vision.face.Face)1 TextBlock (com.google.android.gms.vision.text.TextBlock)1