Table of Contents

Enum TgaOrigin

Namespace
Egami.Formats.Tga
Assembly
Egami.dll

Where a TGA's first stored pixel goes.

public enum TgaOrigin

Fields

BottomLeft = 0

Rows go from the bottom up, pixels left to right. The default and the most widely read.

BottomRight = 1

Rows go from the bottom up, pixels right to left.

TopLeft = 2

Rows go from the top down, pixels left to right.

TopRight = 3

Rows go from the top down, pixels right to left.

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;