Class AndroidImageSource
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
Methods
SetImage(Bitmap, bool)
Sets the image from an Android Bitmap object.
public void SetImage(Bitmap image, bool disposeImage = false)
Parameters
imageBitmapThe Android Bitmap to use as the image source.
disposeImageboolIf 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
imageStreamStreamThe stream containing the image data to decode.
leaveOpenboolIf 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
imageBitmapThe Android Bitmap to use as the image source.
disposeImageboolIf 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
imageStreamStreamThe stream containing the image data to decode.
leaveOpenboolIf 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
contentOverlayTextThe 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
contentOverlayTextThe overlay text content containing text, font, color, and positioning information.
Returns
- Task
A task representing the asynchronous operation.