Packages

 

com.aspose.imaging.fileformats.jpeg

Class JpegImage

    • Constructor Detail

      • JpegImage

        public JpegImage(String path)

        Initializes a new instance of the JpegImage class.

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

        public JpegImage(InputStream stream)

        Initializes a new instance of the JpegImage class.

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

        public JpegImage(RasterImage rasterImage)

        Initializes a new instance of the JpegImage class.

        Parameters:
        rasterImage - The image to initialize pixel and palette data with.
      • JpegImage

        public JpegImage(int width,
                         int height)

        Initializes a new instance of the JpegImage class.

        Parameters:
        width - The image width.
        height - The image height.
      • JpegImage

        public JpegImage(JpegOptions jpegOptions,
                         int width,
                         int height)

        Initializes a new instance of the JpegImage class.

        Parameters:
        jpegOptions - The jpeg options.
        width - Image width.
        height - Image height.
    • Method Detail

      • getFileFormat

        public long getFileFormat()

        Gets a value of file format

        Overrides:
        getFileFormat in class Image
      • getJpegOptions

        public JpegOptions getJpegOptions()

        Gets the JPEG options used to create or load this JpegImage instance.

        Returns:
        The JPEG options.
      • getBitsPerPixel

        public int getBitsPerPixel()

        Gets the image bits per pixel count.

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

        public String getComment()

        Gets the jpeg file comment.

      • setComment

        public void setComment(String value)

        Sets the jpeg file comment.

      • getExifData

        public JpegExifData getExifData()

        Get or set exif data container

      • setExifData

        public void setExifData(JpegExifData value)

        Get or set 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.

        Note by default this value is always 96 since different platforms cannot return the screen resolution. You may consider using the SetResolution method for updating both resolution values in single call.

      • 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.

        Note by default this value is always 96 since different platforms cannot return the screen resolution. You may consider using the SetResolution method for updating both resolution values in single call.

      • getJfif

        public JFIFData getJfif()

        Gets the jfif.

      • setJfif

        public void setJfif(JFIFData value)

        Sets the jfif.

      • getVerticalResolution

        public double getVerticalResolution()

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

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

        Note by default this value is always 72 since different platforms cannot return the screen resolution. You may consider using the SetResolution method for updating both resolution values in single call.

      • 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.

        Note by default this value is always 72 since different platforms cannot return the screen resolution. You may consider using the SetResolution method for updating both resolution values in single call.

      • getRgbColorProfile

        public StreamSource getRgbColorProfile()

        The RGB color profile for CMYK and YCCK jpeg images. Must be in pair with CMYKColorProfile for correct color conversion.

      • setRgbColorProfile

        public void setRgbColorProfile(StreamSource value)

        The RGB color profile for CMYK and YCCK jpeg images. Must be in pair with CMYKColorProfile for correct color conversion.

      • getCmykColorProfile

        public StreamSource getCmykColorProfile()

        The CMYK color profile for CMYK and YCCK jpeg images. Must be in pair with RGBColorProfile for correct color conversion.

      • setCmykColorProfile

        public void setCmykColorProfile(StreamSource value)

        The CMYK color profile for CMYK and YCCK jpeg images. Must be in pair with RGBColorProfile for correct color conversion.

      • getDestinationRgbColorProfile

        public StreamSource getDestinationRgbColorProfile()

        The RGB color profile for CMYK and YCCK jpeg images, used for image saving process. Must be in pair with CMYKColorProfile for correct color conversion.

      • setDestinationRgbColorProfile

        public void setDestinationRgbColorProfile(StreamSource value)

        The RGB color profile for CMYK and YCCK jpeg images, used for image saving process. Must be in pair with CMYKColorProfile for correct color conversion.

      • getDestinationCmykColorProfile

        public StreamSource getDestinationCmykColorProfile()

        The CMYK color profile for CMYK and YCCK jpeg images, used for image saving process. Must be in pair with RGBColorProfile for correct color conversion.

      • setDestinationCmykColorProfile

        public void setDestinationCmykColorProfile(StreamSource value)

        The CMYK color profile for CMYK and YCCK jpeg images, used for image saving process. Must be in pair with RGBColorProfile for correct color conversion.

      • getIgnoreEmbeddedColorProfile

        public boolean getIgnoreEmbeddedColorProfile()

        Gets a value indicating whether embedded color profile is ignored. If embedded color profile is ignored, dafault color profile is used.

      • setIgnoreEmbeddedColorProfile

        public void setIgnoreEmbeddedColorProfile(boolean value)

        Sets a value indicating whether embedded color profile is ignored. If embedded color profile is ignored, dafault color profile is used.

      • setResolution

        public void setResolution(double dpiX,
                                  double dpiY)

        Sets the resolution for this RasterImage.

        Overrides:
        setResolution in class RasterImage
        Parameters:
        dpiX - The horizontal resolution, in dots per inch, of the RasterImage.
        dpiY - The vertical resolution, in dots per inch, of the RasterImage.
      • autoRotate

        public void autoRotate()

        Perform automatic rotate of image depending on orientation data provided by Exif.