RgbaImage
ChartForgeX.Raster
Represents a dependency-free 32-bit RGBA raster image.
Inheritance
- ValueType
- RgbaImage
Remarks
This value borrows the supplied mutable pixel array without copying it. Keep the array alive and avoid changing it while a renderer or encoder uses the image. Composition and typed visual-canvas image entrypoints document when they create independent snapshots.
Usage
Explore 88 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 53
- Method ChartExtensions.ToRgbaImage
- Method ImageComposition.ToRgbaImage
- Extension method VisualCanvas.ToRgbaImage
- Method VisualCanvas.RenderRgba
- Extension method Chart.ToRgbaImage
- Extension method ChartGrid.ToRgbaImage
- Method VisualMask.ToRgbaImage
- Method VisualTurbulence.Generate
- Property MermaidFlowchartRenderOptions.ImageBindings
- Method VisualMotionPresentation.ToRgbaImage
- Property RasterAnimationFrame.Image
- Method RasterImageDecoder.Decode
- Method RasterImageDecoder.Read
- Method CapturedVisualLayer.ToRgbaImage
- Method IStaticVisualSource.RenderRgba
- Method PreparedVisual.ToRgbaImage
- Method PreparedVisualStory.RenderAt
- Property VisualStoryMediaSurface.Raster
- Property SvgRasterizationResult.Image
- Method SvgRasterizer.ToRgbaImage
- Extension method TopologyChart.ToRgbaImage
- Method TopologyChartExtensions.ToRgbaImage
- Method TopologyMotionPresentation.ToRgbaImage
- Extension method VisualArtifact.ToRgbaImage
- Method VisualArtifactRendering.ToRgbaImage
- Method ActivityTimelineBlock.RenderRgba
- Method BlockLayoutBlock.RenderRgba
- Method ChartList.RenderRgba
- Method ChartTable.RenderRgba
- Method DateStripBlock.RenderRgba
- Method EntityStripBlock.RenderRgba
- Method FactualVisualBlock<T>.RenderRgba
- Method FishboneDiagramBlock.RenderRgba
- Method GitGraphBlock.RenderRgba
- Method HeatmapInsightCard.RenderRgba
- Extension method IVisualBlock.ToRgbaImage
- Method JourneyDiagramBlock.RenderRgba
- Method MetricCard.RenderRgba
- Method PacketLayoutBlock.RenderRgba
- Method RadialMetricCard.RenderRgba
- Method RailroadDiagramBlock.RenderRgba
- Method ScheduleTimelineBlock.RenderRgba
- Method SectionHeaderBlock.RenderRgba
- Method SegmentedMetricBlock.RenderRgba
- Method TimelineDiagramBlock.RenderRgba
- Method TreeViewBlock.RenderRgba
- Method VennDiagramBlock.RenderRgba
- Method VisualBlock<T>.RenderRgba
- Extension method VisualGrid.ToRgbaImage
- Method VisualGrid.RenderRgba
- Method WardleyMapBlock.RenderRgba
- Method WorkloadListBlock.RenderRgba
- Method VisualsExtensions.ToRgbaImage
Accepted by parameters 35
- Method ChartExtensions.SaveRasterImage
- Method ChartExtensions.ToJpeg
- Method ChartExtensions.ToPng
- Method ChartExtensions.ToRasterImage
- Method ChartExtensions.WriteRasterImage
- Method ImageComposition.DrawImage
- Method ImageComposition.FromImage
- Extension method VisualCanvas.AddRasterImage
- Method VisualCanvas.AddHeroBadge
- Method VisualCanvas.AddImage
- Method ChartFill.Image
- Method ChartFill.Pattern
- Method ChartPictorialArtwork.FromImage
- Constructor VisualMask.VisualMask
- Constructor RasterAnimationFrame.RasterAnimationFrame
- Method RasterImageDecoder.TryDecode
- Method RasterImageDecoder.TryRead
- Method RasterStoryExtensions.SaveGif
- Method RasterStoryExtensions.ToApng
- Method RasterStoryExtensions.ToGif
- Method RasterStoryExtensions.ToGif
- Method RasterStoryExtensions.WriteGif
- Extension method RgbaImage.SaveGif
- Extension method RgbaImage.SaveRasterImage
- Extension method RgbaImage.ToGif
- Extension method RgbaImage.ToJpeg
- Extension method RgbaImage.ToPng
- Extension method RgbaImage.ToRasterImage
- Extension method RgbaImage.ToVisualCanvas
- Extension method RgbaImage.WriteGif
- Extension method RgbaImage.WriteRasterImage
- Constructor VisualStoryMediaSurface.VisualStoryMediaSurface
- Method TopologyIconArtwork.Portrait
- Method VisualsExtensions.AddRasterImage
- Method VisualsExtensions.ToVisualCanvas
Constructors
public RgbaImage(int width, int height, byte[] pixels) #Initializes an RGBA raster image.
Parameters
- width int
- The image width in pixels.
- height int
- The image height in pixels.
- pixels byte[]
- Borrowed mutable RGBA pixels, row-major from top-left. The constructor does not copy the array.
Inherited Methods
Fields
public readonly byte[] Pixels #Gets the image pixels as RGBA bytes, row-major from top-left.
Extension 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 void SaveRasterImage(RgbaImage image, string path, RasterImageFormat format, RasterImageOptions? options = null) #Saves RGBA pixels to a dependency-free raster file.
Parameters
- image ChartForgeX.Raster.RgbaImage
- The image to encode.
- path string
- The output file path.
- format ChartForgeX.Core.RasterImageFormat
- The raster image format.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
public static void SaveRasterImage(RgbaImage image, string path, RasterImageOptions? options = null) #Saves RGBA pixels to a raster file using the output path extension to choose the format.
Parameters
- image ChartForgeX.Raster.RgbaImage
- The image to encode.
- path string
- The output file path.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
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[] ToJpeg(RgbaImage image, RasterImageOptions? options = null) #Encodes RGBA pixels to JPEG bytes after flattening transparent pixels against the configured background.
Parameters
- image ChartForgeX.Raster.RgbaImage
- The image to encode.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
Returns
byte[] A JPEG image.public static byte[] ToPng(RgbaImage image) #Encodes RGBA pixels to PNG bytes.
Parameters
- image ChartForgeX.Raster.RgbaImage
- The image to encode.
Returns
byte[] A PNG image.public static byte[] ToPng(RgbaImage image, RasterImageOptions? options) #Encodes an RGBA image as PNG bytes using dependency-free raster options.
Parameters
- image ChartForgeX.Raster.RgbaImage
- options ChartForgeX.Core.RasterImageOptions?
Returns
byte[]public static byte[] ToRasterImage(RgbaImage image, RasterImageFormat format, RasterImageOptions? options = null) #Encodes RGBA pixels to a dependency-free raster format.
Parameters
- image ChartForgeX.Raster.RgbaImage
- The image to encode.
- format ChartForgeX.Core.RasterImageFormat
- The raster image format.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
Returns
byte[] Encoded raster image bytes.public static VisualCanvas ToVisualCanvas(RgbaImage image, VisualCanvasImageFit fit = Stretch) #Creates a visual canvas from decoded RGBA pixels with the image as the first layer.
Parameters
- image ChartForgeX.Raster.RgbaImage
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
Returns
VisualCanvaspublic 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
public static void WriteRasterImage(RgbaImage image, Stream stream, RasterImageFormat format, RasterImageOptions? options = null) #Writes RGBA pixels to a dependency-free raster stream.
Parameters
- image ChartForgeX.Raster.RgbaImage
- The image to encode.
- stream System.IO.Stream
- The destination stream.
- format ChartForgeX.Core.RasterImageFormat
- The raster image format.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.