Table of Contents

Class AppleImageSource

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

Apple-specific implementation of IImageSource that provides image and text overlay source functionality using CoreGraphics on iOS and macOS platforms. Supports loading images from streams, CGImage objects, and rendering text overlays with customizable fonts and colors.

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

Constructors

AppleImageSource(bool, bool)

Creates a new instance of the AppleImageSource class.

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

Parameters

useAbsoluteTimestamps bool

If true, uses absolute timestamps; otherwise uses relative timestamps.

loop bool

If true, the source will loop when it reaches the end.

Methods

SetImage(CGImage, bool)

Sets the image from a CoreGraphics CGImage object.

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

Parameters

image CGImage

The CGImage to use as the source.

disposeImage bool

If true, the CGImage is disposed after use.

SetImage(Stream, bool)

Sets the image from a stream containing image data. The stream is read using CoreGraphics CGImageSource.

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

Parameters

imageStream Stream

The stream containing the image data.

leaveOpen bool

If true, the stream is left open after reading; otherwise it is closed and disposed.

SetImageAsync(CGImage, bool)

Asynchronously sets the image from a CoreGraphics CGImage object.

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

Parameters

image CGImage

The CGImage to use as the source.

disposeImage bool

If true, the CGImage is disposed after use.

Returns

Task

A task representing the asynchronous operation.

SetImageAsync(Stream, bool)

Asynchronously sets the image from a stream containing image data.

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

Parameters

imageStream Stream

The stream containing the image data.

leaveOpen bool

If true, the stream is left open after reading; otherwise it is closed and disposed.

Returns

Task

A task representing the asynchronous operation.

SetText(OverlayText)

Sets the source content to a text overlay rendered using CoreText. Supports customizable font family, size, style, colors, and outline.

public override void SetText(OverlayText content)

Parameters

content OverlayText

The overlay text configuration including text, font, and color settings.

SetTextAsync(OverlayText)

Asynchronously sets the source content to a text overlay.

public override Task SetTextAsync(OverlayText content)

Parameters

content OverlayText

The overlay text configuration including text, font, and color settings.

Returns

Task

A task representing the asynchronous operation.