Packages

 

com.aspose.imaging.fileformats.tiff

Class TiffFrame

    • Constructor Detail

      • TiffFrame

        public TiffFrame(InputStream stream)

        Initializes a new instance of the TiffFrame class.

        Parameters:
        stream - The stream to load an image from and initialize frame pixel and palette data with.
      • TiffFrame

        public TiffFrame(InputStream stream,
                         TiffOptions options)

        Initializes a new instance of the TiffFrame class.

        Parameters:
        stream - The stream to load an image from and initialize frame pixel and palette data with.
        options - The options to use for the newly created frame.
      • TiffFrame

        public TiffFrame(String path)

        Initializes a new instance of the TiffFrame class.

        Parameters:
        path - The path to load an image from and initialize frame pixel and palette data with.
      • TiffFrame

        public TiffFrame(String path,
                         TiffOptions options)

        Initializes a new instance of the TiffFrame class.

        Parameters:
        path - The path to load an image from and initialize frame pixel and palette data with.
        options - The options to use for the newly created frame.
      • TiffFrame

        public TiffFrame(RasterImage image)

        Initializes a new instance of the TiffFrame class.

        Parameters:
        image - The image to initialize frame pixel and palette data with.
      • TiffFrame

        public TiffFrame(RasterImage image,
                         TiffOptions options)

        Initializes a new instance of the TiffFrame class.

        Parameters:
        image - The image to initialize frame pixel and palette data with.
        options - The options to use for the newly created frame.
      • TiffFrame

        public TiffFrame(TiffOptions options,
                         int width,
                         int height)

        Initializes a new instance of the TiffFrame class.

        Parameters:
        options - The frame options.
        width - The width.
        height - The height.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Options parameter is null.
    • Method Detail

      • getBackgroundColor

        public Color getBackgroundColor()

        Gets a value for the background color.

        Overrides:
        getBackgroundColor in class Image
      • setBackgroundColor

        public void setBackgroundColor(Color value)

        Sets a value for the background color.

        Overrides:
        setBackgroundColor in class Image
      • hasAlpha

        public boolean hasAlpha()

        Gets a value indicating whether this instance has alpha.

        Overrides:
        hasAlpha in class RasterImage
        Returns:
        true if this instance has alpha; otherwise, false.
      • hasTransparentColor

        public boolean hasTransparentColor()

        Gets a value indicating whether image has transparent color.

        Overrides:
        hasTransparentColor in class RasterImage
      • setTransparentColor

        public void setTransparentColor(boolean value)

        Gets a value indicating whether image has transparent color.

        Overrides:
        setTransparentColor in class RasterImage
      • getBitsPerPixel

        public int getBitsPerPixel()

        Gets the image bits per pixel count.

        Specified by:
        getBitsPerPixel in class Image
        Returns:
        The image bits per pixel count.
      • getFrameOptions

        public TiffOptions getFrameOptions()

        Gets the frame create options.

      • getExifData

        public ExifData getExifData()

        Gets EXIF data from frame.

        Returns:
        EXIF data container
      • setExifData

        public void setExifData(ExifData value)

        Sets EXIF data from frame.

        Parameters:
        value - EXIF data container
      • getHorizontalResolution

        public double getHorizontalResolution()

        Gets the horizontal resolution, in pixels per inch, of this RasterImage.

        Overrides:
        getHorizontalResolution in class RasterImage
        Returns:
        The horizontal resolution.
      • setHorizontalResolution

        public void setHorizontalResolution(double value)

        Sets the horizontal resolution, in pixels per inch, of this RasterImage.

        Overrides:
        setHorizontalResolution in class RasterImage
        Parameters:
        value - The horizontal resolution.
      • getVerticalResolution

        public double getVerticalResolution()

        Gets the vertical resolution, in pixels per inch, of this RasterImage.

        Overrides:
        getVerticalResolution in class RasterImage
        Returns:
        The vertical resolution.
      • setVerticalResolution

        public void setVerticalResolution(double value)

        Sets the vertical resolution, in pixels per inch, of this RasterImage.

        Overrides:
        setVerticalResolution in class RasterImage
        Parameters:
        value - The vertical resolution.
      • alignResolutions

        public void alignResolutions()

        Helper method to make horizontal and vertical resolutions equal.

      • copyFrame

        public static TiffFrame copyFrame(TiffFrame tiffFrame)

        Copies the entire frame (duplicates).

        Parameters:
        tiffFrame - The tiff frame to copy.
        Returns:
        The newly copied tiff frame.
      • createFrameFrom

        public static TiffFrame createFrameFrom(TiffFrame tiffFrame,
                                                TiffOptions options)

        Creates the frame from specified tiffFrame using the specified options. The pixel data is preserved but converted to the desired format.

        Parameters:
        tiffFrame - The tiff frame to create from.
        options - The new options to use.
        Returns:
        The newly created frame.