ImagePixelFormat Enumeration |
Specifies the pixel format for the generated images of document pages.
Namespace:
Aspose.Words.Saving
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntaxpublic enum ImagePixelFormat
Public Enumeration ImagePixelFormat
public enum class ImagePixelFormat
Members
| Member name | Value | Description |
---|
| Format16BppRgb555 | 0 |
16 bits per pixel, RGB.
|
| Format16BppRgb565 | 1 |
16 bits per pixel, RGB.
|
| Format16BppArgb1555 | 2 |
16 bits per pixel, ARGB.
|
| Format24BppRgb | 3 |
24 bits per pixel, RGB.
|
| Format32BppRgb | 4 |
32 bits per pixel, RGB.
|
| Format32BppArgb | 5 |
32 bits per pixel, ARGB.
|
| Format32BppPArgb | 6 |
32 bits per pixel, ARGB, premultiplied alpha.
|
| Format48BppRgb | 7 |
48 bits per pixel, RGB.
|
| Format64BppArgb | 8 |
64 bits per pixel, ARGB.
|
| Format64BppPArgb | 9 |
64 bits per pixel, ARGB, premultiplied alpha.
|
| Format1bppIndexed | 10 |
1 bit per pixel, Indexed.
|
ExamplesShow how to convert document images to black and white with 1 bit per pixel
Document doc = new Document(MyDir + "Rendering.docx");
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
imageSaveOptions.ImageColorMode = ImageColorMode.BlackAndWhite;
imageSaveOptions.PixelFormat = ImagePixelFormat.Format1bppIndexed;
Assert.AreNotEqual(imageSaveOptions, imageSaveOptions.Clone());
doc.Save(ArtifactsDir + "ImageSaveOptions.BlackAndWhite.png", imageSaveOptions);
See Also