java.lang.Object
com.aspose.words.ImagePixelFormat
public class ImagePixelFormat
- extends java.lang.Object
Utility class containing constants.
Specifies the pixel format for the generated images of document pages.
Example:
Shows how to select a bit-per-pixel rate with which to render a document to an image.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.getParagraphFormat().setStyle(doc.getStyles().get("Heading 1"));
builder.writeln("Hello world!");
builder.insertImage(getImageDir() + "Logo.jpg");
// When we save the document as an image, we can pass a SaveOptions object to
// select a pixel format for the image that the saving operation will generate.
// Various bit per pixel rates will affect the quality and file size of the generated image.
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.PNG);
imageSaveOptions.setPixelFormat(imagePixelFormat);
// We can clone ImageSaveOptions instances.
Assert.assertNotEquals(imageSaveOptions, imageSaveOptions.deepClone());
doc.save(getArtifactsDir() + "ImageSaveOptions.PixelFormat.png", imageSaveOptions);
Field Summary |
static final int | FORMAT_16_BPP_RGB_555 = 0 | |
16 bits per pixel, RGB.
|
static final int | FORMAT_16_BPP_RGB_565 = 1 | |
16 bits per pixel, RGB.
|
static final int | FORMAT_16_BPP_ARGB_1555 = 2 | |
16 bits per pixel, ARGB.
|
static final int | FORMAT_24_BPP_RGB = 3 | |
24 bits per pixel, RGB.
|
static final int | FORMAT_32_BPP_RGB = 4 | |
32 bits per pixel, RGB.
|
static final int | FORMAT_32_BPP_ARGB = 5 | |
32 bits per pixel, ARGB.
|
static final int | FORMAT_32_BPP_P_ARGB = 6 | |
32 bits per pixel, ARGB, premultiplied alpha.
|
static final int | FORMAT_48_BPP_RGB = 7 | |
48 bits per pixel, RGB.
|
static final int | FORMAT_64_BPP_ARGB = 8 | |
64 bits per pixel, ARGB.
|
static final int | FORMAT_64_BPP_P_ARGB = 9 | |
64 bits per pixel, ARGB, premultiplied alpha.
|
static final int | FORMAT_1_BPP_INDEXED = 10 | |
1 bit per pixel, Indexed.
|
FORMAT_16_BPP_RGB_555 = 0 | |
public static final int FORMAT_16_BPP_RGB_555 |
-
16 bits per pixel, RGB.
FORMAT_16_BPP_RGB_565 = 1 | |
public static final int FORMAT_16_BPP_RGB_565 |
-
16 bits per pixel, RGB.
FORMAT_16_BPP_ARGB_1555 = 2 | |
public static final int FORMAT_16_BPP_ARGB_1555 |
-
16 bits per pixel, ARGB.
FORMAT_24_BPP_RGB = 3 | |
public static final int FORMAT_24_BPP_RGB |
-
24 bits per pixel, RGB.
FORMAT_32_BPP_RGB = 4 | |
public static final int FORMAT_32_BPP_RGB |
-
32 bits per pixel, RGB.
FORMAT_32_BPP_ARGB = 5 | |
public static final int FORMAT_32_BPP_ARGB |
-
32 bits per pixel, ARGB.
FORMAT_32_BPP_P_ARGB = 6 | |
public static final int FORMAT_32_BPP_P_ARGB |
-
32 bits per pixel, ARGB, premultiplied alpha.
FORMAT_48_BPP_RGB = 7 | |
public static final int FORMAT_48_BPP_RGB |
-
48 bits per pixel, RGB.
FORMAT_64_BPP_ARGB = 8 | |
public static final int FORMAT_64_BPP_ARGB |
-
64 bits per pixel, ARGB.
FORMAT_64_BPP_P_ARGB = 9 | |
public static final int FORMAT_64_BPP_P_ARGB |
-
64 bits per pixel, ARGB, premultiplied alpha.
FORMAT_1_BPP_INDEXED = 10 | |
public static final int FORMAT_1_BPP_INDEXED |
-
1 bit per pixel, Indexed.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.