TiffCompressOption 枚举

定义

指定关于标记图像文件格式 (TIFF) 位图的可行压缩方案。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
继承
TiffCompressOption

字段

Ccitt3 2

使用 CCITT3 压缩方案。The CCITT3 compression schema is used.

Ccitt4 3

使用 CCITT4 压缩方案。The CCITT4 compression schema is used.

Default 0

TiffBitmapEncoder 编码器尝试使用最佳的可行压缩方案保存位图。The TiffBitmapEncoder encoder attempts to save the bitmap with the best possible compression schema.

Lzw 4

使用 LZW 压缩方案。The LZW compression schema is used.

None 1

标记图像文件格式 (TIFF)Tagged Image File Format (TIFF) 图像未经压缩。The 标记图像文件格式 (TIFF)Tagged Image File Format (TIFF) image is not compressed.

Rle 5

使用 RLE 压缩方案。The RLE compression schema is used.

Zip 6

使用 Zip 压缩方案。Zip compression schema is used.

示例

下面的示例演示如何使用Compression属性。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)

注解

Ccitt3、Ccitt4 和 Rle 要求PixelFormat将值设置为。 BlackWhiteThe Ccitt3, Ccitt4, and Rle require that the PixelFormat value be set to BlackWhite. 如果将设置Compression 为其他任何值,则会将属性值重置PixelFormat为默认值。Setting the PixelFormat to any other value resets the Compression property value to Default.

适用于

另请参阅