Class TgaWriterOptions
Options for writing TGA.
public sealed class TgaWriterOptions : WriterOptions
- Inheritance
-
TgaWriterOptions
- Inherited Members
Examples
image.Save("duck-gray.tga", new TgaWriterOptions { PixelFormat = TgaPixelFormat.Gray8, Rle = false });
using Raster back = Raster.Load("duck-gray.tga");
TgaDetails details = (TgaDetails)back.Metadata.FormatDetails!;
bool upsideDown = details.Origin is TgaOrigin.BottomLeft or TgaOrigin.BottomRight;
bool hasAlpha = details.AlphaType is TgaAlphaType.Straight or TgaAlphaType.Premultiplied;
Properties
Default
Gets the default options.
public static TgaWriterOptions Default { get; }
Property Value
Palette
Gets how the color map is built for Indexed8 when the image has more than 256 colors.
public PaletteOptions Palette { get; init; }
Property Value
Remarks
Defaults to Default: up to 256 colors, Floyd–Steinberg dithering.
PixelFormat
Gets the pixel layout. Defaults to Auto.
public TgaPixelFormat PixelFormat { get; init; }
Property Value
Rle
Gets whether to run-length encode the pixels. Defaults to true.
public bool Rle { get; init; }