Uredi

Deli z drugimi prek


TiffCompressOption Enum

Definition

Specifies the possible compression schemes for Tagged Image File Format (TIFF) bitmap images.

public enum class TiffCompressOption
public enum TiffCompressOption
type TiffCompressOption = 
Public Enum TiffCompressOption
Inheritance
TiffCompressOption

Fields

Name Value Description
Default 0

The TiffBitmapEncoder encoder attempts to save the bitmap with the best possible compression schema.

None 1

The Tagged Image File Format (TIFF) image is not compressed.

Ccitt3 2

The CCITT3 compression schema is used.

Ccitt4 3

The CCITT4 compression schema is used.

Lzw 4

The LZW compression schema is used.

Rle 5

The RLE compression schema is used.

Zip 6

Zip compression schema is used.

Examples

The following example demonstrates how to use the Compression property.

FileStream^ stream = gcnew FileStream("new.tif", FileMode::Create);
TiffBitmapEncoder^ encoder = gcnew TiffBitmapEncoder();
TextBlock^ myTextBlock = gcnew TextBlock();
myTextBlock->Text = "Codec Author is: " + encoder->CodecInfo->Author->ToString();
encoder->Compression = TiffCompressOption::Zip;
encoder->Frames->Add(BitmapFrame::Create(image));
encoder->Save(stream);
var stream = new FileStream("new.tif", FileMode.Create);
var encoder = new TiffBitmapEncoder();
var myTextBlock = new TextBlock();
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString();
encoder.Compression = TiffCompressOption.Zip;
encoder.Frames.Add(BitmapFrame.Create(image));
encoder.Save(stream);
Dim stream As New FileStream("new.tif", FileMode.Create)
Dim encoder As New TiffBitmapEncoder()
Dim myTextBlock As New TextBlock()
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString()
encoder.Compression = TiffCompressOption.Zip
encoder.Frames.Add(BitmapFrame.Create(image))
encoder.Save(stream)

Remarks

The Ccitt3, Ccitt4, and Rle require that the PixelFormat value be set to BlackWhite. Setting the PixelFormat to any other value resets the Compression property value to Default.

Applies to

See also