Class TiffEncoder
Encoder for writing the data image to a stream in TIFF format.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Formats.Tiff
Assembly: SixLabors.ImageSharp.dll
Syntax
public class TiffEncoder : QuantizingImageEncoder, IImageEncoder
Properties
| Improve this Doc View SourceBitsPerPixel
Gets the number of bits per pixel.
Declaration
public TiffBitsPerPixel? BitsPerPixel { get; set; }
Property Value
Type | Description |
---|---|
Nullable<TiffBitsPerPixel> |
Compression
Gets the compression type to use.
Declaration
public TiffCompression? Compression { get; set; }
Property Value
Type | Description |
---|---|
Nullable<TiffCompression> |
CompressionLevel
Gets the compression level 1-9 for the deflate compression mode.
Declaration
public DeflateCompressionLevel? CompressionLevel { get; set; }
Property Value
Type | Description |
---|---|
Nullable<DeflateCompressionLevel> |
HorizontalPredictor
Gets a value indicating which horizontal prediction to use. This can improve the compression ratio with deflate or lzw compression.
Declaration
public TiffPredictor? HorizontalPredictor { get; set; }
Property Value
Type | Description |
---|---|
Nullable<TiffPredictor> |
PhotometricInterpretation
Gets the PhotometricInterpretation to use. Possible options are RGB, RGB with a color palette, gray or BiColor. If no PhotometricInterpretation is specified or it is unsupported by the encoder, RGB will be used.
Declaration
public TiffPhotometricInterpretation? PhotometricInterpretation { get; set; }
Property Value
Type | Description |
---|---|
Nullable<TiffPhotometricInterpretation> |
Methods
| Improve this Doc View SourceEncode<TPixel>(Image<TPixel>, Stream, CancellationToken)
Encodes the image to the specified stream from the Image<TPixel>.
Declaration
protected override void Encode<TPixel>(Image<TPixel> image, Stream stream, CancellationToken cancellationToken)
where TPixel : struct, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Image<TPixel> | image | The Image<TPixel> to encode from. |
Stream | stream | The |
CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
Overrides
Remarks
This method is designed to support the ImageSharp internal infrastructure and is not recommended for direct use.