Class IndexedImageFrame<TPixel>
A pixel-specific image frame where each pixel buffer value represents an index in a color palette.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class IndexedImageFrame<TPixel> : IDisposable where TPixel : unmanaged, IPixel<TPixel>
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
Properties
| Edit this page View SourceConfiguration
Gets the configuration which allows altering default behaviour or extending the library.
Declaration
public Configuration Configuration { get; }
Property Value
Type | Description |
---|---|
Configuration |
Height
Gets the height of this IndexedImageFrame<TPixel>.
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
int |
Palette
Gets the color palette of this IndexedImageFrame<TPixel>.
Declaration
public ReadOnlyMemory<TPixel> Palette { get; }
Property Value
Type | Description |
---|---|
ReadOnlyMemory<TPixel> |
Width
Gets the width of this IndexedImageFrame<TPixel>.
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceDangerousGetRowSpan(int)
Gets the representation of the pixels as a ReadOnlySpan<T> of contiguous memory
at row rowIndex
beginning from the first pixel on that row.
Declaration
public ReadOnlySpan<byte> DangerousGetRowSpan(int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
int | rowIndex | The row index in the pixel buffer. |
Returns
Type | Description |
---|---|
ReadOnlySpan<byte> | The pixel row as a ReadOnlySpan<T>. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
GetWritablePixelRowSpanUnsafe(int)
Gets the representation of the pixels as a Span<T> of contiguous memory
at row rowIndex
beginning from the first pixel on that row.
Note: Values written to this span are not sanitized against the palette length. Care should be taken during assignment to prevent out-of-bounds errors.
Declaration
public Span<byte> GetWritablePixelRowSpanUnsafe(int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
int | rowIndex | The row index in the pixel buffer. |
Returns
Type | Description |
---|---|
Span<byte> | The pixel row as a Span<T>. |