Class AppleImageSource
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
useAbsoluteTimestampsboolIf true, uses absolute timestamps; otherwise uses relative timestamps.
loopboolIf 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
imageCGImageThe CGImage to use as the source.
disposeImageboolIf 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
imageStreamStreamThe stream containing the image data.
leaveOpenboolIf 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
imageCGImageThe CGImage to use as the source.
disposeImageboolIf 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
imageStreamStreamThe stream containing the image data.
leaveOpenboolIf 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
contentOverlayTextThe 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
contentOverlayTextThe overlay text configuration including text, font, and color settings.
Returns
- Task
A task representing the asynchronous operation.