TiffBitmapEncoder.Compression Eigenschaft

Definition

Ruft einen Wert ab, der den Komprimierungstyp angibt, der von diesem TIFF-Image (Tagged Image File Format) verwendet wird, oder legt diesen fest.

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

Eigenschaftswert

Einer der TiffCompressOption-Werte. Der Standardwert ist Default.

Beispiele

Im folgenden Beispiel wird die Verwendung der Compression -Eigenschaft veranschaulicht.

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)

Hinweise

Für die Ccitt3Werte , Ccitt4, und Rle muss der PixelFormat Wert auf PixelFormats.BlackWhitefestgelegt werden.

Gilt für: