Table of Contents

Class AndroidImageSource

Namespace
VAST.Image
Assembly
VAST.Common.Ext.Android.dll

Android-specific implementation of IImageSource that provides image source functionality using Android Bitmap and Canvas APIs. Supports loading images from streams, bitmaps, and text overlay rendering.

public class AndroidImageSource : IImageSource, IMediaSource, IReferenceable, IDisposable
Inheritance
AndroidImageSource
Implements
Inherited Members

Constructors

AndroidImageSource(bool, bool)

Create new instance of AndroidImageSource

public AndroidImageSource(bool useAbsoluteTimestamps = false, bool loop = true)

Parameters

useAbsoluteTimestamps bool
loop bool

Methods

SetImage(Bitmap, bool)

Sets the image from an Android Bitmap object.

public void SetImage(Bitmap image, bool disposeImage = false)

Parameters

image Bitmap

The Android Bitmap to use as the image source.

disposeImage bool

If true, the bitmap is disposed after processing; otherwise, it is left intact.

SetImage(Stream, bool)

Sets the image from a stream by decoding it using Android BitmapFactory.

public override void SetImage(Stream imageStream, bool leaveOpen = false)

Parameters

imageStream Stream

The stream containing the image data to decode.

leaveOpen bool

If true, the stream is left open after the image is loaded; otherwise, the stream is closed and disposed.

SetImageAsync(Bitmap, bool)

Asynchronously sets the image from an Android Bitmap object.

public Task SetImageAsync(Bitmap image, bool disposeImage = false)

Parameters

image Bitmap

The Android Bitmap to use as the image source.

disposeImage bool

If true, the bitmap is disposed after processing; otherwise, it is left intact.

Returns

Task

A task representing the asynchronous operation.

SetImageAsync(Stream, bool)

Asynchronously sets the image from a stream by decoding it using Android BitmapFactory.

public override Task SetImageAsync(Stream imageStream, bool leaveOpen = false)

Parameters

imageStream Stream

The stream containing the image data to decode.

leaveOpen bool

If true, the stream is left open after the image is loaded; otherwise, the stream is closed and disposed.

Returns

Task

A task representing the asynchronous operation.

SetText(OverlayText)

Sets the image source to render text overlay content.

public override void SetText(OverlayText content)

Parameters

content OverlayText

The overlay text content containing text, font, color, and positioning information.

SetTextAsync(OverlayText)

Asynchronously sets the image source to render text overlay content.

public override Task SetTextAsync(OverlayText content)

Parameters

content OverlayText

The overlay text content containing text, font, color, and positioning information.

Returns

Task

A task representing the asynchronous operation.