TiffCompressOption 列舉

定義

為標記的影像檔案格式 (TIFF) 點陣圖影像指定可能的壓縮配置。

public enum class TiffCompressOption
public enum TiffCompressOption
type TiffCompressOption = 
Public Enum TiffCompressOption
繼承
TiffCompressOption

欄位

Ccitt3 2

使用 CCITT3 壓縮配置。

Ccitt4 3

使用 CCITT4 壓縮配置。

Default 0

TiffBitmapEncoder 編碼器嘗試以最佳的可能壓縮配置來儲存點陣圖。

Lzw 4

使用 RLE 壓縮配置。

None 1

不會壓縮標記影像檔案格式 (TIFF) 影像。

Rle 5

使用 RLE 壓縮配置。

Zip 6

使用 Zip 壓縮配置。

範例

下列範例示範如何使用 Compression 屬性。

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)

備註

Ccitt3、Ccitt4 和 Rle 需要將 PixelFormat 值設定為 BlackWhitePixelFormat將 設定為任何其他值,會將 Compression 屬性值重設為 Default。

適用於

另請參閱