Class ImageRef
[Register("io/scanbot/sdk/image/ImageRef", DoNotGenerateAcw = true)]
public sealed class ImageRef : Drawable, IParcelable, IAutoCloseable, IJavaObject, IJavaPeerable, IDisposable
- Inheritance
-
ImageRef
- Implements
- Inherited Members
Constructors
ImageRef(UUID, bool)
[Register(".ctor", "(Ljava/util/UUID;Z)V", "")]
public ImageRef(UUID uniqueId, bool acquireStrongReference)
Parameters
Properties
Opacity
Return the opacity/transparency of this Drawable.
[Obsolete("deprecated")]
public override int Opacity { get; }
Property Value
- int
To be added.
Remarks
Portions of this page are modifications based on work created and shared by the
UniqueId
public UUID UniqueId { get; }
Property Value
Methods
AcquireSerializedReference(UUID)
[Register("acquireSerializedReference", "(Ljava/util/UUID;)Z", "")]
public static bool AcquireSerializedReference(UUID p0)
Parameters
p0UUID
Returns
Clear()
[Register("clear", "()V", "")]
public void Clear()
Close()
Closes this resource, relinquishing any underlying resources.
[Register("close", "()V", "")]
public void Close()
Remarks
<p>Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
try-with-resources statement.
.
java.lang.AutoCloseable.close()
Portions of this page are modifications based on work created and shared by the
Exceptions
DescribeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
[Register("describeContents", "()I", "")]
public int DescribeContents()
Returns
- int
a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Remarks
<p>Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of #writeToParcel(Parcel, int),
the return value of this method must include the
#CONTENTS_FILE_DESCRIPTOR bit.
.
android.os.Parcelable.describeContents()
Portions of this page are modifications based on work created and shared by the
Deserialize(string)
[Register("deserialize", "(Ljava/lang/String;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef Deserialize(string source)
Parameters
sourcestring
Returns
Draw(Canvas)
Draw in its bounds (set via setBounds) respecting optional effects such as alpha (set via setAlpha) and color filter (set via setColorFilter).
[Register("draw", "(Landroid/graphics/Canvas;)V", "")]
public override void Draw(Canvas canvas)
Parameters
canvasCanvasThe canvas to draw into
Remarks
<p>Draw in its bounds (set via setBounds) respecting optional effects such
as alpha (set via setAlpha) and color filter (set via setColorFilter).
.
android.graphics.drawable.Drawable.draw(android.graphics.Canvas)
Portions of this page are modifications based on work created and shared by the
EncodeImage()
[Register("encodeImage", "()Lio/scanbot/common/Result;", "")]
public IResult EncodeImage()
Returns
EncodeImage(EncodeImageOptions)
[Register("encodeImage", "(Lio/scanbot/sdk/image/EncodeImageOptions;)Lio/scanbot/common/Result;", "")]
public IResult EncodeImage(EncodeImageOptions options)
Parameters
optionsEncodeImageOptions
Returns
FromBitmap(Bitmap)
[Register("fromBitmap", "(Landroid/graphics/Bitmap;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromBitmap(Bitmap bitmap)
Parameters
bitmapBitmap
Returns
FromBitmap(Bitmap, BasicImageLoadOptions)
[Register("fromBitmap", "(Landroid/graphics/Bitmap;Lio/scanbot/sdk/image/BasicImageLoadOptions;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromBitmap(Bitmap p0, BasicImageLoadOptions p1)
Parameters
p0Bitmapp1BasicImageLoadOptions
Returns
FromEncodedBuffer(ByteBuffer)
[Register("fromEncodedBuffer", "(Ljava/nio/ByteBuffer;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromEncodedBuffer(ByteBuffer encodedBuffer)
Parameters
encodedBufferByteBuffer
Returns
FromEncodedBuffer(ByteBuffer, BufferImageLoadOptions)
[Register("fromEncodedBuffer", "(Ljava/nio/ByteBuffer;Lio/scanbot/sdk/image/BufferImageLoadOptions;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromEncodedBuffer(ByteBuffer encodedBuffer, BufferImageLoadOptions options)
Parameters
encodedBufferByteBufferoptionsBufferImageLoadOptions
Returns
FromEncodedBuffer(byte[])
[Register("fromEncodedBuffer", "([B)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromEncodedBuffer(byte[] encodedBuffer)
Parameters
encodedBufferbyte[]
Returns
FromEncodedBuffer(byte[], BufferImageLoadOptions)
[Register("fromEncodedBuffer", "([BLio/scanbot/sdk/image/BufferImageLoadOptions;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromEncodedBuffer(byte[] p0, BufferImageLoadOptions p1)
Parameters
p0byte[]p1BufferImageLoadOptions
Returns
FromInputStream(Stream)
[Register("fromInputStream", "(Ljava/io/InputStream;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromInputStream(Stream inputStream)
Parameters
inputStreamStream
Returns
FromInputStream(Stream, BufferImageLoadOptions)
[Register("fromInputStream", "(Ljava/io/InputStream;Lio/scanbot/sdk/image/BufferImageLoadOptions;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromInputStream(Stream inputStream, BufferImageLoadOptions options)
Parameters
inputStreamStreamoptionsBufferImageLoadOptions
Returns
FromJson(JSONObject)
[Register("fromJson", "(Lorg/json/JSONObject;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromJson(JSONObject source)
Parameters
sourceJSONObject
Returns
FromJson(IDictionary<string, Object>)
[Register("fromJson", "(Ljava/util/Map;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromJson(IDictionary<string, Object> source)
Parameters
sourceIDictionary<string, Object>
Returns
FromNv21(byte[], int, int)
[Register("fromNv21", "([BII)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromNv21(byte[] nv21, int width, int height)
Parameters
Returns
FromNv21(byte[], int, int, RawImageLoadOptions)
[Register("fromNv21", "([BIILio/scanbot/sdk/image/RawImageLoadOptions;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromNv21(byte[] p0, int p1, int p2, RawImageLoadOptions p3)
Parameters
p0byte[]p1intp2intp3RawImageLoadOptions
Returns
FromPath(string)
[Register("fromPath", "(Ljava/lang/String;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromPath(string path)
Parameters
pathstring
Returns
FromPath(string, PathImageLoadOptions)
[Register("fromPath", "(Ljava/lang/String;Lio/scanbot/sdk/image/PathImageLoadOptions;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromPath(string p0, PathImageLoadOptions p1)
Parameters
p0stringp1PathImageLoadOptions
Returns
FromSerializedReference(UUID)
[Register("fromSerializedReference", "(Ljava/util/UUID;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromSerializedReference(UUID uniqueId)
Parameters
uniqueIdUUID
Returns
FromYUV420(ByteBuffer, int, int, ByteBuffer, int, int, ByteBuffer, int, int, int, int)
[Register("fromYUV420", "(Ljava/nio/ByteBuffer;IILjava/nio/ByteBuffer;IILjava/nio/ByteBuffer;IIII)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromYUV420(ByteBuffer yPlaneBuffer, int yPlaneRowStride, int yPlanePixelStride, ByteBuffer uPlaneBuffer, int uPlaneRowStride, int uPlanePixelStride, ByteBuffer vPlaneBuffer, int vPlaneRowStride, int vPlanePixelStride, int width, int height)
Parameters
yPlaneBufferByteBufferyPlaneRowStrideintyPlanePixelStrideintuPlaneBufferByteBufferuPlaneRowStrideintuPlanePixelStrideintvPlaneBufferByteBuffervPlaneRowStrideintvPlanePixelStrideintwidthintheightint
Returns
FromYUV420(ByteBuffer, int, int, ByteBuffer, int, int, ByteBuffer, int, int, int, int, RawImageLoadOptions)
[Register("fromYUV420", "(Ljava/nio/ByteBuffer;IILjava/nio/ByteBuffer;IILjava/nio/ByteBuffer;IIIILio/scanbot/sdk/image/RawImageLoadOptions;)Lio/scanbot/sdk/image/ImageRef;", "")]
public static ImageRef FromYUV420(ByteBuffer yPlaneBuffer, int yPlaneRowStride, int yPlanePixelStride, ByteBuffer uPlaneBuffer, int uPlaneRowStride, int uPlanePixelStride, ByteBuffer vPlaneBuffer, int vPlaneRowStride, int vPlanePixelStride, int width, int height, RawImageLoadOptions options)
Parameters
yPlaneBufferByteBufferyPlaneRowStrideintyPlanePixelStrideintuPlaneBufferByteBufferuPlaneRowStrideintuPlanePixelStrideintvPlaneBufferByteBuffervPlaneRowStrideintvPlanePixelStrideintwidthintheightintoptionsRawImageLoadOptions
Returns
Hibernate()
[Register("hibernate", "()Lio/scanbot/common/Result;", "")]
public IResult Hibernate()
Returns
Info()
[Register("info", "()Lio/scanbot/common/Result;", "")]
public IResult Info()
Returns
InvalidateDrawable()
[Register("invalidateDrawable", "()V", "")]
public void InvalidateDrawable()
RegisterPlatformImageDecoders()
[Register("registerPlatformImageDecoders", "()V", "")]
public static void RegisterPlatformImageDecoders()
ReleaseAllImages()
[Register("releaseAllImages", "()V", "")]
public static void ReleaseAllImages()
ReleaseStrongReference(UUID)
[Register("releaseStrongReference", "(Ljava/util/UUID;)Z", "")]
public static bool ReleaseStrongReference(UUID p0)
Parameters
p0UUID
Returns
RenderToBitmap(Bitmap)
[Register("renderToBitmap", "(Landroid/graphics/Bitmap;)Lio/scanbot/common/Result;", "")]
public IResult RenderToBitmap(Bitmap target)
Parameters
targetBitmap
Returns
RenderToHardwareBuffer(HardwareBuffer)
[Register("renderToHardwareBuffer", "(Landroid/hardware/HardwareBuffer;)Lio/scanbot/common/Result;", "")]
public IResult RenderToHardwareBuffer(HardwareBuffer target)
Parameters
targetHardwareBuffer
Returns
SaveImage(string)
[Register("saveImage", "(Ljava/lang/String;)Lio/scanbot/common/Result;", "")]
public IResult SaveImage(string path)
Parameters
pathstring
Returns
SaveImage(string, SaveImageOptions)
[Register("saveImage", "(Ljava/lang/String;Lio/scanbot/sdk/image/SaveImageOptions;)Lio/scanbot/common/Result;", "")]
public IResult SaveImage(string path, SaveImageOptions options)
Parameters
pathstringoptionsSaveImageOptions
Returns
Serialize()
[Register("serialize", "()Ljava/lang/String;", "")]
public string Serialize()
Returns
SetAlpha(int)
Specify an alpha value for the drawable.
[Register("setAlpha", "(I)V", "")]
public override void SetAlpha(int alpha)
Parameters
alphaintTo be added.
Remarks
<p>Specify an alpha value for the drawable. 0 means fully transparent, and
255 means fully opaque.
.
android.graphics.drawable.Drawable.setAlpha(int)
Portions of this page are modifications based on work created and shared by the
SetColorFilter(ColorFilter)
Specify an optional color filter for the drawable.
[Register("setColorFilter", "(Landroid/graphics/ColorFilter;)V", "")]
public override void SetColorFilter(ColorFilter colorFilter)
Parameters
colorFilterColorFilterThe color filter to apply, or
nullto remove the existing color filter
Remarks
<p>Specify an optional color filter for the drawable.</p>
<p>If a Drawable has a ColorFilter, each output pixel of the Drawable's
drawing contents will be modified by the color filter before it is blended onto the render target of a Canvas.
Pass null to remove any existing color filter.
<strong>Note:</strong> Setting a non-null color
filter disables #setTintList(ColorStateList) tint.
Portions of this page are modifications based on work created and shared by the
SetHibernationCacheDirPath(string)
[Register("setHibernationCacheDirPath", "(Ljava/lang/String;)Lio/scanbot/common/Result;", "")]
public static IResult SetHibernationCacheDirPath(string p0)
Parameters
p0string
Returns
SetHibernationJpegQuality(int)
[Register("setHibernationJpegQuality", "(I)V", "")]
public static void SetHibernationJpegQuality(int p0)
Parameters
p0int
SetOptimizeDrawableSize(bool)
[Register("setOptimizeDrawableSize", "(Z)V", "")]
public void SetOptimizeDrawableSize(bool optimizeImageSize)
Parameters
optimizeImageSizebool
SetStorageCryptingProvider(ICoreStreamProvider)
[Register("setStorageCryptingProvider", "(Lio/scanbot/sdk/persistence/fileio/CoreStreamProvider;)Lio/scanbot/common/Result;", "")]
public static IResult SetStorageCryptingProvider(ICoreStreamProvider p0)
Parameters
Returns
ToBitmap()
[Register("toBitmap", "()Lio/scanbot/common/Result;", "")]
public IResult ToBitmap()
Returns
ToJson(ImageSerializationMode)
[Register("toJson", "(Lio/scanbot/sdk/common/ImageSerializationMode;)Lorg/json/JSONObject;", "")]
public JSONObject ToJson(ImageSerializationMode imageSerializationMode)
Parameters
imageSerializationModeImageSerializationMode
Returns
UpgradeSerializedReference(UUID)
[Register("upgradeSerializedReference", "(Ljava/util/UUID;)Z", "")]
public static bool UpgradeSerializedReference(UUID p0)
Parameters
p0UUID
Returns
WriteToParcel(Parcel, ParcelableWriteFlags)
Flatten this object in to a Parcel.
[Register("writeToParcel", "(Landroid/os/Parcel;I)V", "")]
public void WriteToParcel(Parcel parcel, ParcelableWriteFlags flags)
Parameters
parcelParcelflagsParcelableWriteFlagsAdditional flags about how the object should be written. May be 0 or
#PARCELABLE_WRITE_RETURN_VALUE.
Remarks
Flatten this object in to a Parcel.
.
android.os.Parcelable.writeToParcel(android.os.Parcel, int)
Portions of this page are modifications based on work created and shared by the