Click or drag to resize

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
Syntax
public enum ImagePixelFormat
Members
  Member nameValueDescription
Format16BppRgb5550 16 bits per pixel, RGB.
Format16BppRgb5651 16 bits per pixel, RGB.
Format16BppArgb15552 16 bits per pixel, ARGB.
Format24BppRgb3 24 bits per pixel, RGB.
Format32BppRgb4 32 bits per pixel, RGB.
Format32BppArgb5 32 bits per pixel, ARGB.
Format32BppPArgb6 32 bits per pixel, ARGB, premultiplied alpha.
Format48BppRgb7 48 bits per pixel, RGB.
Format64BppArgb8 64 bits per pixel, ARGB.
Format64BppPArgb9 64 bits per pixel, ARGB, premultiplied alpha.
Format1bppIndexed10 1 bit per pixel, Indexed.
Examples
Show 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;

// ImageSaveOptions instances can be cloned
Assert.AreNotEqual(imageSaveOptions, imageSaveOptions.Clone());  

doc.Save(ArtifactsDir + "ImageSaveOptions.BlackAndWhite.png", imageSaveOptions);
See Also