PngDevice
Inheritance: java.lang.Object, com.aspose.pdf.devices.Device com.aspose.pdf.devices.PageDevice com.aspose.pdf.devices.ImageDevice com.aspose.pdf.devices.PngDevice, com.aspose.pdf.devices.Device, com.aspose.pdf.devices.PageDevice com.aspose.pdf.devices.ImageDevice com.aspose.pdf.devices.PngDevice, com.aspose.pdf.devices.PageDevice, com.aspose.pdf.devices.ImageDevice com.aspose.pdf.devices.PngDevice, com.aspose.pdf.devices.ImageDevice, com.aspose.pdf.devices.PngDevice
public final class PngDevice extends ImageDevice
Represents image device that helps to save pdf document pages into png.
Constructors
| Constructor | Description |
|---|---|
| PngDevice | Initializes a new instance of the {@code PngDevice} class with default resolution. |
| PngDevice | Initializes a new instance of the {@code PngDevice} class with provided image dimensions, default resolution (=150). |
| PngDevice | Initializes a new instance of the {@code PngDevice} class with default resolution. |
| PngDevice | Initializes a new instance of the {@code PngDevice} class with default resolution. |
| PngDevice | Initializes a new instance of the {@code PngDevice} class with default resolution. |
| PngDevice | Initializes a new instance of the {@code PngDevice} class with default resolution. |
Methods
| Method | Description |
|---|---|
| isTransparentBackground | Gets or sets if image has transparent background. |
| process | Converts the page into png and saves it in the output stream. |
| processInternal | Converts the page into png and saves it in the output stream. |
| processToBufferedImage | Converts the page into BufferedImage. |
| processToBufferedImageBinarized | Converts the page into BufferedImage with Bradley binarization. |
| setTransparentBackground | Gets or sets if image has transparent background. |
PngDevice
public PngDevice()
Initializes a new instance of the {@code PngDevice} class with default resolution.
PngDevice
public PngDevice(int width, int height)
Initializes a new instance of the {@code PngDevice} class with provided image dimensions, default resolution (=150).
Parameters:
| Parameter | Type | Description |
|---|---|---|
| width | Image output width. | |
| height | Image output height. |
PngDevice
Initializes a new instance of the {@code PngDevice} class with default resolution.
PngDevice
Initializes a new instance of the {@code PngDevice} class with default resolution.
PngDevice
Initializes a new instance of the {@code PngDevice} class with default resolution.
PngDevice
Initializes a new instance of the {@code PngDevice} class with default resolution.
isTransparentBackground
public final boolean isTransparentBackground()
Gets or sets if image has transparent background.
Returns: boolean value
process
Converts the page into png and saves it in the output stream.
processInternal
Converts the page into png and saves it in the output stream.
processToBufferedImage
Converts the page into BufferedImage.
processToBufferedImageBinarized
Converts the page into BufferedImage with Bradley binarization.
setTransparentBackground
public final void setTransparentBackground(boolean value)
Gets or sets if image has transparent background.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |