JpegDevice

Inheritance: java.lang.Object, com.aspose.pdf.devices.Device, com.aspose.pdf.devices.PageDevice, com.aspose.pdf.devices.ImageDevice

public final class JpegDevice extends ImageDevice

Represents image device that helps to save pdf document pages into jpeg.

Constructors

ConstructorDescription
JpegDevice()Initializes a new instance of the JpegDevice class with default resolution and maximum quality.
JpegDevice(Resolution resolution)Initializes a new instance of the JpegDevice class.
JpegDevice(int quality)Initializes a new instance of the JpegDevice class.
JpegDevice(Resolution resolution, int quality)Initializes a new instance of the JpegDevice class.
JpegDevice(int width, int height)Initializes a new instance of the JpegDevice class with provided image dimensions, default resolution (=150) and maximum quality.
JpegDevice(PageSize pageSize)Initializes a new instance of the JpegDevice class with provided page size, default resolution (=150) and maximum quality.
JpegDevice(int width, int height, Resolution resolution)Initializes a new instance of the JpegDevice class with provided image dimensions, resolution and maximum quality.
JpegDevice(PageSize pageSize, Resolution resolution)Initializes a new instance of the JpegDevice class with provided page size, resolution and maximum quality.
JpegDevice(int width, int height, Resolution resolution, int quality)Initializes a new instance of the JpegDevice class with provided image dimensions, resolution and quality.
JpegDevice(PageSize pageSize, Resolution resolution, int quality)Initializes a new instance of the JpegDevice class with provided page size, resolution and quality.

Methods

MethodDescription
processInternal(Page page, System.IO.Stream output)Converts the page into jpeg and saves it in the output stream.
process(Page page, OutputStream output)Converts the page into jpeg and saves it in the output stream.

JpegDevice()

public JpegDevice()

Initializes a new instance of the JpegDevice class with default resolution and maximum quality.

JpegDevice(Resolution resolution)

public JpegDevice(Resolution resolution)

Initializes a new instance of the JpegDevice class.

Parameters:

ParameterTypeDescription
resolutionResolutionResolution for the result image file, see Resolution class.

JpegDevice(int quality)

public JpegDevice(int quality)

Initializes a new instance of the JpegDevice class.

Parameters:

ParameterTypeDescription
qualityintSpecifies the level of compression for an image. The range of useful values for the quality is from 0 to 100. The lower the number specified, the higher the compression and therefore the lower the quality of the image. Zero would give you the lowest quality image and 100 the highest.

JpegDevice(Resolution resolution, int quality)

public JpegDevice(Resolution resolution, int quality)

Initializes a new instance of the JpegDevice class.

Parameters:

ParameterTypeDescription
resolutionResolutionResolution for the result image file, see Resolution class.
qualityintSpecifies the level of compression for an image. The range of useful values for the quality is from 0 to 100. The lower the number specified, the higher the compression and therefore the lower the quality of the image. Zero would give you the lowest quality image and 100 the highest.

JpegDevice(int width, int height)

public JpegDevice(int width, int height)

Initializes a new instance of the JpegDevice class with provided image dimensions, default resolution (=150) and maximum quality.

Parameters:

ParameterTypeDescription
widthintImage output width.
heightintImage output height.

JpegDevice(PageSize pageSize)

public JpegDevice(PageSize pageSize)

Initializes a new instance of the JpegDevice class with provided page size, default resolution (=150) and maximum quality.

Parameters:

ParameterTypeDescription
pageSizePageSizePage size of the output image.

JpegDevice(int width, int height, Resolution resolution)

public JpegDevice(int width, int height, Resolution resolution)

Initializes a new instance of the JpegDevice class with provided image dimensions, resolution and maximum quality.

Parameters:

ParameterTypeDescription
widthintImage output width.
heightintImage output height.
resolutionResolutionResolution for the result image file, see Resolution class.

JpegDevice(PageSize pageSize, Resolution resolution)

public JpegDevice(PageSize pageSize, Resolution resolution)

Initializes a new instance of the JpegDevice class with provided page size, resolution and maximum quality.

Parameters:

ParameterTypeDescription
pageSizePageSizePage size of the output image.
resolutionResolutionResolution for the result image file, see Resolution class.

JpegDevice(int width, int height, Resolution resolution, int quality)

public JpegDevice(int width, int height, Resolution resolution, int quality)

Initializes a new instance of the JpegDevice class with provided image dimensions, resolution and quality.

Parameters:

ParameterTypeDescription
widthintImage output width.
heightintImage output height.
resolutionResolutionResolution for the result image file, see Resolution class.
qualityintSpecifies the level of compression for an image. The range of useful values for the quality is from 0 to 100. The lower the number specified, the higher the compression and therefore the lower the quality of the image. Zero would give you the lowest quality image and 100 the highest.

JpegDevice(PageSize pageSize, Resolution resolution, int quality)

public JpegDevice(PageSize pageSize, Resolution resolution, int quality)

Initializes a new instance of the JpegDevice class with provided page size, resolution and quality.

Parameters:

ParameterTypeDescription
pageSizePageSizePage size of the output image.
resolutionResolutionResolution for the result image file, see Resolution class.
qualityintSpecifies the level of compression for an image. The range of useful values for the quality is from 0 to 100. The lower the number specified, the higher the compression and therefore the lower the quality of the image. Zero would give you the lowest quality image and 100 the highest.

processInternal(Page page, System.IO.Stream output)

public void processInternal(Page page, System.IO.Stream output)

Converts the page into jpeg and saves it in the output stream.

Parameters:

ParameterTypeDescription
pagePageThe page to convert.
outputcom.aspose.ms.System.IO.StreamOutput stream with jpeg image.

process(Page page, OutputStream output)

public void process(Page page, OutputStream output)

Converts the page into jpeg and saves it in the output stream.

Parameters:

ParameterTypeDescription
pagePageThe page to convert.
outputjava.io.OutputStreamOutput stream with jpeg image.