Class CameraImageUtils
- Namespace
- IO.Scanbot.Sdk.UI.Camera.Util
- Assembly
- BarcodeSDK.NET.Droid.dll
[Register("io/scanbot/sdk/ui/camera/util/CameraImageUtils", DoNotGenerateAcw = true)]
public sealed class CameraImageUtils : Object, IJavaObject, IJavaPeerable, IDisposable
- Inheritance
-
CameraImageUtils
- Implements
-
- Inherited Members
-
Fields
A
[Register("a")]
public const string A = "ImageUtil"
Field Value
- string
Properties
Instance
[Register("INSTANCE")]
public static CameraImageUtils Instance { get; }
Property Value
- CameraImageUtils
Methods
BitmapToNv21(Bitmap, int, int)
[Register("bitmapToNv21", "(Landroid/graphics/Bitmap;II)[B", "")]
public static byte[] BitmapToNv21(Bitmap src, int width, int height)
Parameters
src
Bitmap
width
int
height
int
Returns
- byte[]
ComputeCropRectFromAspectRatio(Size, Rational)
[Register("computeCropRectFromAspectRatio", "(Landroid/util/Size;Landroid/util/Rational;)Landroid/graphics/Rect;", "")]
public static Rect ComputeCropRectFromAspectRatio(Size sourceSize, Rational aspectRatio)
Parameters
sourceSize
Size
aspectRatio
Rational
Returns
- Rect
CropByteArray(byte[], Rect)
[Register("cropByteArray", "([BLandroid/graphics/Rect;)[B", "")]
public static byte[] CropByteArray(byte[] data, Rect cropRect)
Parameters
data
byte[]
cropRect
Rect
Returns
- byte[]
ImageToJpegByteArray(IImageProxy)
[Register("imageToJpegByteArray", "(Landroidx/camera/core/ImageProxy;)[B", "")]
public static byte[] ImageToJpegByteArray(IImageProxy image)
Parameters
image
IImageProxy
Returns
- byte[]
IsAspectRatioValid(Rational)
[Register("isAspectRatioValid", "(Landroid/util/Rational;)Z", "")]
public bool IsAspectRatioValid(Rational aspectRatio)
Parameters
aspectRatio
Rational
Returns
- bool
IsAspectRatioValid(Size, Rational)
[Register("isAspectRatioValid", "(Landroid/util/Size;Landroid/util/Rational;)Z", "")]
public bool IsAspectRatioValid(Size sourceSize, Rational aspectRatio)
Parameters
sourceSize
Size
aspectRatio
Rational
Returns
- bool
Nv21ToJpeg(byte[], int, int, Rect)
[Register("nv21ToJpeg", "([BIILandroid/graphics/Rect;)[B", "")]
public static byte[] Nv21ToJpeg(byte[] nv21, int width, int height, Rect cropRect)
Parameters
nv21
byte[]
width
int
height
int
cropRect
Rect
Returns
- byte[]
Nv21ToYuv420888(byte[], int, int)
[Register("nv21ToYuv420888", "([BII)[B", "")]
public static byte[] Nv21ToYuv420888(byte[] nv21, int width, int height)
Parameters
nv21
byte[]
width
int
height
int
Returns
- byte[]
Rotate(Rational, int)
[Register("rotate", "(Landroid/util/Rational;I)Landroid/util/Rational;", "")]
public static Rational Rotate(Rational rational, int rotation)
Parameters
rational
Rational
rotation
int
Returns
- Rational
Yuv420888toNv21(IImageProxy)
[Register("yuv420888toNv21", "(Landroidx/camera/core/ImageProxy;)[B", "")]
public static byte[] Yuv420888toNv21(IImageProxy image)
Parameters
image
IImageProxy
Returns
- byte[]