Table of Contents

Class CameraImageUtils

Namespace
IO.Scanbot.Sdk.UI.Camera.Util
Assembly
DocumentSDK.NET.Droid.dll
public sealed class CameraImageUtils : Object
Inheritance
CameraImageUtils

Fields

A

public const string A = "ImageUtil"

Field Value

string

Properties

Instance

public static CameraImageUtils Instance { get; }

Property Value

CameraImageUtils

Methods

BitmapToNv21(Bitmap, int, int)

public static byte[] BitmapToNv21(Bitmap src, int width, int height)

Parameters

src Bitmap
width int
height int

Returns

byte[]

ComputeCropRectFromAspectRatio(Size, Rational)

public static Rect ComputeCropRectFromAspectRatio(Size sourceSize, Rational aspectRatio)

Parameters

sourceSize Size
aspectRatio Rational

Returns

Rect

CropByteArray(byte[], Rect)

public static byte[] CropByteArray(byte[] data, Rect cropRect)

Parameters

data byte[]
cropRect Rect

Returns

byte[]

ImageToJpegByteArray(IImageProxy)

public static byte[] ImageToJpegByteArray(IImageProxy image)

Parameters

image IImageProxy

Returns

byte[]

IsAspectRatioValid(Rational)

public bool IsAspectRatioValid(Rational aspectRatio)

Parameters

aspectRatio Rational

Returns

bool

IsAspectRatioValid(Size, Rational)

public bool IsAspectRatioValid(Size sourceSize, Rational aspectRatio)

Parameters

sourceSize Size
aspectRatio Rational

Returns

bool

Nv21ToJpeg(byte[], int, int, Rect)

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)

public static byte[] Nv21ToYuv420888(byte[] nv21, int width, int height)

Parameters

nv21 byte[]
width int
height int

Returns

byte[]

Rotate(Rational, int)

public static Rational Rotate(Rational rational, int rotation)

Parameters

rational Rational
rotation int

Returns

Rational

Yuv420888toNv21(IImageProxy)

public static byte[] Yuv420888toNv21(IImageProxy image)

Parameters

image IImageProxy

Returns

byte[]