TiffBitmapEncoder.Compression TiffBitmapEncoder.Compression TiffBitmapEncoder.Compression TiffBitmapEncoder.Compression Property

定義

これによって使用される圧縮の種類を示す値を取得またはTagged Image File Format (TIFF)Tagged Image File Format (TIFF)イメージ。Gets or sets a value that indicates the type of compression that is used by this Tagged Image File Format (TIFF)Tagged Image File Format (TIFF) image.

public:
 property System::Windows::Media::Imaging::TiffCompressOption Compression { System::Windows::Media::Imaging::TiffCompressOption get(); void set(System::Windows::Media::Imaging::TiffCompressOption value); };
public System.Windows.Media.Imaging.TiffCompressOption Compression { get; set; }
member this.Compression : System.Windows.Media.Imaging.TiffCompressOption with get, set
Public Property Compression As TiffCompressOption

プロパティ値

TiffCompressOption 値のいずれか 1 つ。One of the TiffCompressOption values. 既定値は Default です。The default is Default.

次の例では、使用する方法、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);
FileStream stream = new FileStream("new.tif", FileMode.Create);
TiffBitmapEncoder encoder = new TiffBitmapEncoder();
TextBlock 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)

注釈

Ccitt3Ccitt4、およびRle値を必要とする、PixelFormat値に設定するPixelFormats.BlackWhiteします。The Ccitt3, Ccitt4, and Rle values require that the PixelFormat value be set to PixelFormats.BlackWhite.

適用対象