Class
RasterStoryExtensions
ChartForgeX.Raster
Encodes static or animated pixel inputs using the core GIF and APNG encoders.
Inheritance
- object
- RasterStoryExtensions
Methods
public static void SaveGif(RgbaImage image, string path) #Saves one RGBA image as a single-frame GIF.
Parameters
- image ChartForgeX.Raster.RgbaImage
- path string
public static byte[] ToApng(IReadOnlyList<RgbaImage> frames, int delayCentiseconds = 10, bool loop = true) #Encodes ordered, equally sized frames as animated PNG.
Parameters
- frames System.Collections.Generic.IReadOnlyList<ChartForgeX.Raster.RgbaImage>
- One or more complete RGBA canvases with matching dimensions.
- delayCentiseconds int = 10
- A nonnegative delay applied to every frame, up to 6,553,500 centiseconds. Zero is preserved.
- loop bool = true
- Repeats indefinitely when true; otherwise plays once.
Returns
byte[]ToGif 2 overloads
public static byte[] ToGif(RgbaImage image) #Encodes one RGBA image as a single-frame GIF.
Parameters
- image ChartForgeX.Raster.RgbaImage
Returns
byte[]public static byte[] ToGif(IReadOnlyList<RgbaImage> frames, int delayCentiseconds = 10, bool loop = true) #Encodes ordered, equally sized frames as GIF.
Parameters
- frames System.Collections.Generic.IReadOnlyList<ChartForgeX.Raster.RgbaImage>
- One or more complete RGBA canvases with matching dimensions.
- delayCentiseconds int = 10
- A nonnegative delay applied to every frame, up to 65,535 centiseconds. Zero is preserved.
- loop bool = true
- Repeats indefinitely when true; otherwise plays once.
Returns
byte[]public static void WriteGif(RgbaImage image, Stream stream) #Writes one RGBA image as a single-frame GIF.
Parameters
- image ChartForgeX.Raster.RgbaImage
- stream System.IO.Stream