GifDevice

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

public final class GifDevice extends ImageDevice

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

Constructors

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

Methods

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

GifDevice()

public GifDevice()

Initializes a new instance of the GifDevice class with default resolution.

GifDevice(Resolution resolution)

public GifDevice(Resolution resolution)

Initializes a new instance of the GifDevice class.

Parameters:

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

GifDevice(int width, int height, Resolution resolution)

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

Initializes a new instance of the GifDevice class with provided image dimensions and resolution.

Parameters:

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

GifDevice(PageSize pageSize, Resolution resolution)

public GifDevice(PageSize pageSize, Resolution resolution)

Initializes a new instance of the GifDevice class with provided page size and resolution.

Parameters:

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

GifDevice(int width, int height)

public GifDevice(int width, int height)

Initializes a new instance of the GifDevice class with provided image dimensions, default resolution (=150).

Parameters:

ParameterTypeDescription
widthintImage output width.
heightintImage output height.

GifDevice(PageSize pageSize)

public GifDevice(PageSize pageSize)

Initializes a new instance of the GifDevice class with provided page size, default resolution (=150).

Parameters:

ParameterTypeDescription
pageSizePageSizePage size of the output image.

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

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

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

Parameters:

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

process(Page page, OutputStream output)

public void process(Page page, OutputStream output)

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

Parameters:

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