Compartir vía


TiffBitmapEncoder.Compression Propiedad

Definición

Obtiene o establece un valor que indica el tipo de compresión que usa esta imagen de formato de archivo de imagen etiquetada (TIFF).

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

Valor de propiedad

Uno de los valores de TiffCompressOption. De manera predeterminada, es Default.

Ejemplos

En el ejemplo siguiente se muestra cómo usar la Compression propiedad .

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)

Comentarios

Los Ccitt3valores , Ccitt4y Rle requieren que el PixelFormat valor se establezca en PixelFormats.BlackWhite.

Se aplica a