Table of Contents

Class TgaEncoder

Namespace
SixLabors.ImageSharp.Formats.Tga
Assembly
SixLabors.ImageSharp.dll

Image encoder for writing an image to a stream as a Targa true-vision image.

public sealed class TgaEncoder : ImageEncoder, IImageEncoder
Inheritance
TgaEncoder
Implements
Inherited Members

Constructors

TgaEncoder()

public TgaEncoder()

Properties

BitsPerPixel

Gets the number of bits per pixel.

public TgaBitsPerPixel? BitsPerPixel { get; init; }

Property Value

TgaBitsPerPixel?

Compression

Gets a value indicating whether no compression or run length compression should be used.

public TgaCompression Compression { get; init; }

Property Value

TgaCompression

Methods

Encode<TPixel>(Image<TPixel>, Stream, CancellationToken)

protected override void Encode<TPixel>(Image<TPixel> image, Stream stream, CancellationToken cancellationToken) where TPixel : unmanaged, IPixel<TPixel>

Parameters

image Image<TPixel>
stream Stream
cancellationToken CancellationToken

Type Parameters

TPixel