com.aspose.pdf.devices

Class GifDevice



  • public final class GifDevice
    extends ImageDevice

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

    • Constructor Detail

      • GifDevice

        public GifDevice()

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

      • GifDevice

        public GifDevice(Resolution resolution)

        Initializes a new instance of the GifDevice class.

        Parameters:
        resolution - Resolution for the result image file, see Resolution class.
      • GifDevice

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

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

        Parameters:
        width - Image output width.
        height - Image output height.
        resolution - Resolution for the result image file, see Resolution class.
      • GifDevice

        public GifDevice(PageSize pageSize,
                 Resolution resolution)

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

        Parameters:
        pageSize - Page size of the output image.
        resolution - Resolution for the result image file, see Resolution class.
      • GifDevice

        public GifDevice(int width,
                 int height)

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

        Parameters:
        width - Image output width.
        height - Image output height.
      • GifDevice

        public GifDevice(PageSize pageSize)

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

        Parameters:
        pageSize - Page size of the output image.
    • Method Detail

      • processInternal

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

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

        Specified by:
        processInternal in class PageDevice
        Parameters:
        page - The page to convert.
        output - Output stream with gif image.
      • process

        public void process(Page page,
                   OutputStream output)

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

        Overrides:
        process in class PageDevice
        Parameters:
        page - The page to convert.
        output - Output stream with gif image.