java.lang.Objectcom.aspose.words.PdfImageColorSpaceExportMode
public class PdfImageColorSpaceExportMode
Example:
Document doc = new Document(getMyDir() + "SaveOptions.PdfImageCompression.rtf");
PdfSaveOptions options = new PdfSaveOptions();
options.setImageCompression(PdfImageCompression.JPEG);
options.setPreserveFormFields(true);
options.setImageColorSpaceExportMode(PdfImageColorSpaceExportMode.SIMPLE_CMYK);
doc.save(getArtifactsDir() + "SaveOptions.PdfImageCompression.pdf", options);
PdfSaveOptions optionsA1B = new PdfSaveOptions();
optionsA1B.setCompliance(PdfCompliance.PDF_A_1_B);
optionsA1B.setImageCompression(PdfImageCompression.JPEG);
optionsA1B.setJpegQuality(50); // Use JPEG compression at 50% quality to reduce file size.
doc.save(getArtifactsDir() + "SaveOptions.PdfImageComppression PDF_A_1_B.pdf", optionsA1B);
Field Summary | ||
---|---|---|
static final int | AUTO | |
Aspose.Words automatically selects the most appropriate color space for each image. | ||
static final int | SIMPLE_CMYK | |
Aspose.Words coverts RGB images to CMYK color space using simple formula. |
Field Detail |
---|
AUTO = 0 | |
public static final int AUTO |
Most of the images are saved in RGB color space. Also Indexed and Grayscale color spaces may be used. CMYK color space is never used.
For some images the color space may be different on different platforms.
SIMPLE_CMYK = 1 | |
public static final int SIMPLE_CMYK |
Images in RGB color space are converted to CMYK using formula: Black = minimum(1-Red,1-Green,1-Blue). Cyan = (1-Red-Black)/(1-Black). Magenta = (1-Green-Black)/(1-Black). Yellow = (1-Blue-Black)/(1-Black). RGB values are normalized - they are between 0 and 1.0.