Enum BitmapCompression

Enum BitmapCompression

名称: Aspose.Imaging.FileFormats.Bmp アセンション: Aspose.Imaging.dll (25.4.0)

さまざまなビットマップ圧縮方法を指定します。

public enum BitmapCompression : uint

Fields

AlphaBitfields = 6

RGBAビットフィールドは、16ビットおよび32ピクセルビットマップのみで使用できます。

Bitfields = 3

RGBビットフィールドは、16ビットおよび32ピクセルビットマップのみで使用できます。

Dxt1 = 827611204

DXT1 圧縮:ビットマップにはテキストが含まれています。

Jpeg = 4

JPEG 圧縮:ビットマップには JPEG 画像が含まれています。

Png = 5

PNG 圧縮:ビットマップには PNG イメージが含まれています。

Rgb = 0

圧縮なし。

Rle4 = 2

RLE 4 ビット / ピクセル 圧縮. 4 ビット / ピクセル ビットマップのみで使用できます。

Rle8 = 1

RLE 8 ビット / ピクセル 圧縮. 8 ビット / ピクセル ビットマップのみで使用できます。

Examples

例では、Rgb 圧縮タイプで BmpImage を輸出する方法を示しています。

string sourcePath = "input.png";
                                                                                    // Load a PNG image from a file.
                                                                                    using (Image pngImage = Image.Load(sourcePath))
                                                                                    {
                                                                                        // BMP image is saved with transparency support by default, that is achieved by using the BitmapCompression.Bitfields compression method. 
                                                                                        // To save a BMP image with the Rgb compression method, the BmpOptions with the Compression property set to BitmapCompression.Rgb should be specified.
                                                                                        pngImage.Save(outputPath, new BmpOptions() { Compression = BitmapCompression.Rgb });
                                                                                    }

例では、Png ファイルから BmpImage をエクスポートする方法を示し、アルファ チャンネルを保存し、透明性をもって Bmp ファイルを保存します。

string sourcePath = "input.png";
                                                                                                                                         // Load a PNG image from a file.
                                                                                                                                         using (Image pngImage = Image.Load(sourcePath))
                                                                                                                                         {
                                                                                                                                             // BMP image is saved with transparency support by default. 
                                                                                                                                             // If you want to explicitly specify such mode, the BmpOptions's Compression property should be set to BitmapCompression.Bitfields.
                                                                                                                                             // The BitmapCompression.Bitfields compression method is the default compression method in the BmpOptions.
                                                                                                                                             // So the same result of exporting a Bmp image with transparency can be achieved by either one of the following ways.
                                                                                                                                             // With an implicit default options:
                                                                                                                                             pngImage.Save(outputPath);
                                                                                                                                             // With an explicit default options:
                                                                                                                                             pngImage.Save(outputPath, new BmpOptions());
                                                                                                                                             // Specifying the BitmapCompression.Bitfields compression method:
                                                                                                                                             pngImage.Save(outputPath, new BmpOptions() { Compression = BitmapCompression.Bitfields });
                                                                                                                                         }
 日本語