public class ImageColorMode
Example:
Document doc = new Document(getMyDir() + "Rendering.docx");
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.PNG);
imageSaveOptions.setImageColorMode(ImageColorMode.BLACK_AND_WHITE);
imageSaveOptions.setPixelFormat(ImagePixelFormat.FORMAT_1_BPP_INDEXED);
// ImageSaveOptions instances can be cloned
Assert.assertNotEquals(imageSaveOptions.deepClone(), imageSaveOptions);
doc.save(getArtifactsDir() + "ImageSaveOptions.BlackAndWhite.png", imageSaveOptions);
Field Summary | ||
---|---|---|
static final int | NONE | |
The pages of the document will be rendered as color images.
|
||
static final int | GRAYSCALE | |
The pages of the document will be rendered as grayscale images.
|
||
static final int | BLACK_AND_WHITE | |
The pages of the document will be rendered as black and white images.
|
public static final int NONE
public static final int GRAYSCALE
public static final int BLACK_AND_WHITE