public final class JpegImage
extends com.aspose.imaging.RasterCachedImage
A jpeg image.
Constructor and Description |
---|
JpegImage(InputStream stream)
Initializes a new instance of the
JpegImage class. |
JpegImage(int width,
int height)
Initializes a new instance of the
JpegImage class. |
JpegImage(JpegOptions jpegOptions,
int width,
int height)
Initializes a new instance of the
JpegImage class. |
JpegImage(RasterImage rasterImage)
Initializes a new instance of the
JpegImage class. |
JpegImage(String path)
Initializes a new instance of the
JpegImage class. |
Modifier and Type | Method and Description |
---|---|
static byte[] |
app1Data_internalized(JpegExifData exifData)
The app 1 data.
|
static byte[] |
app1Data_internalized(XmpPacketWrapper xmpData)
Gets the prepared App1 data block for XMP metadata
|
void |
autoRotate()
Perform automatic rotate of image depending on orientation data provided by Exif.
|
static JpegImage |
createInstance_internalized(int width,
int height,
int pixelFormat,
IRasterImageArgb32PixelLoader jpegDataReader)
Creates the new instance of the
JpegImage class. |
int |
getBitsPerPixel()
Gets the image bits per pixel count.
|
StreamSource |
getCmykColorProfile()
The CMYK color profile for CMYK and YCCK jpeg images.
|
String |
getComment()
Gets or sets the jpeg file comment.
|
StreamSource |
getDestinationCmykColorProfile()
The CMYK color profile for CMYK and YCCK jpeg images, used for image saving process.
|
StreamSource |
getDestinationRgbColorProfile()
The RGB color profile for CMYK and YCCK jpeg images, used for image saving process.
|
JpegExifData |
getExifData()
Get or set exif data container
|
int |
getHeight()
Gets the image height.
|
double |
getHorizontalResolution()
Gets or sets the horizontal resolution, in pixels per inch, of this
RasterImage . |
boolean |
getIgnoreEmbeddedColorProfile()
Gets or sets a value indicating whether embedded color profile is ignored.
|
com.aspose.imaging.fileformats.jpeg.JFIFData |
getJfif()
Gets or sets the jfif.
|
JpegOptions |
getJpegOptions()
Gets the JPEG options used to create or load this
JpegImage instance. |
PixelDataFormat |
getRawDataFormat()
Gets the raw data format.
|
StreamSource |
getRgbColorProfile()
The RGB color profile for CMYK and YCCK jpeg images.
|
double |
getVerticalResolution()
Gets or sets the vertical resolution, in pixels per inch, of this
RasterImage . |
int |
getWidth()
Gets the image width.
|
XmpPacketWrapper |
getXmpData()
Gets or sets the XMP metadata.
|
static void |
saveJpeg_internalized(RasterImage imageToSave,
com.aspose.ms.System.IO.Stream stream,
com.aspose.imaging.fileformats.jpeg.JFIFData jfifData,
JpegExifData exifData,
XmpPacketWrapper xmpData,
JpegOptions options,
Rectangle destImageBounds)
The save jpeg to stream.
|
void |
setCmykColorProfile(StreamSource value)
The CMYK color profile for CMYK and YCCK jpeg images.
|
void |
setComment(String value)
Gets or sets the jpeg file comment.
|
void |
setDestinationCmykColorProfile(StreamSource value)
The CMYK color profile for CMYK and YCCK jpeg images, used for image saving process.
|
void |
setDestinationRgbColorProfile(StreamSource value)
The RGB color profile for CMYK and YCCK jpeg images, used for image saving process.
|
void |
setExifData(JpegExifData value)
Get or set exif data container
|
void |
setHorizontalResolution(double value)
Gets or sets the horizontal resolution, in pixels per inch, of this
RasterImage . |
void |
setIgnoreEmbeddedColorProfile(boolean value)
Gets or sets a value indicating whether embedded color profile is ignored.
|
void |
setJfif(com.aspose.imaging.fileformats.jpeg.JFIFData value)
Gets or sets the jfif.
|
void |
setResolution(double dpiX,
double dpiY)
Sets the resolution for this
RasterImage . |
void |
setRgbColorProfile(StreamSource value)
The RGB color profile for CMYK and YCCK jpeg images.
|
void |
setVerticalResolution(double value)
Gets or sets the vertical resolution, in pixels per inch, of this
RasterImage . |
void |
setXmpData(XmpPacketWrapper value)
Gets or sets the XMP metadata.
|
adjustBrightness, adjustContrast, adjustGamma, adjustGamma, beginResize_internalized, binarizeBradley, binarizeFixed, binarizeOtsu, cacheData, crop, dither, getFormatSpecificPalette_internalized, grayscale, isCached, resize, resize, rotate, rotateFlip, setFormatSpecificPalette_internalized
crop, dither, filter, getArgb32Pixel, getDefaultArgb32Pixels, getDefaultPixels, getDefaultRawData, getDefaultRawData, getPixel, getRawCustomColorConverter, getRawDataSettings, getRawFallbackIndex, getRawIndexedColorConverter, getRawLineSize, getTransparentColor, hasAlpha, hasTransparentColor, isRawDataAvailable, loadArgb32Pixels, loadCmykPixels, loadPartialArgb32Pixels, loadPartialPixels, loadPixels, loadRawData, readScanLine, rotate, saveArgb32Pixels, saveCmykPixels, savePixels, saveRawData, setArgb32Pixel, setPalette, setPixel, setRawCustomColorConverter, setRawFallbackIndex, setRawIndexedColorConverter, setTransparentColor, setTransparentColor, writeScanLine
canLoad, canLoad, canLoad, canLoad, canLoadInternal_internalized, canLoadInternal_internalized, canSave, create, getBackgroundColor, getBounds, getContainer, getFileFormat, getFileFormat, getFileFormatInternal_internalized, getFittingRectangle, getFittingRectangle, getPalette, getProportionalHeight, getProportionalWidth, getSize, getVentureLicense_internalized, hasBackgroundColor, load, load, load, load, loadInternal_internalized, loadInternal_internalized, resize, resizeHeightProportionally, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, resizeWidthProportionally, save_internalized, save, save, save, save, save, setBackgroundColor, setBackgroundColor, setContainer_internalized, setPalette, setVentureLicense_internalized
getDataStreamContainer, save_internalized, save, save, save, setDataStreamContainer
close, dispose, getDisposed
public JpegImage(String path)
Initializes a new instance of the JpegImage
class.
path
- The path to load image from and initialize pixel and palette data with.public JpegImage(InputStream stream)
Initializes a new instance of the JpegImage
class.
stream
- The stream to load image from and initialize pixel and palette data with.public JpegImage(RasterImage rasterImage)
Initializes a new instance of the JpegImage
class.
rasterImage
- The image to initialize pixel and palette data with.public JpegImage(int width, int height)
Initializes a new instance of the JpegImage
class.
width
- The image width.height
- The image height.public JpegImage(JpegOptions jpegOptions, int width, int height)
Initializes a new instance of the JpegImage
class.
jpegOptions
- The jpeg options.width
- Image width.height
- Image height.public JpegOptions getJpegOptions()
Gets the JPEG options used to create or load this JpegImage
instance.
public int getBitsPerPixel()
Gets the image bits per pixel count.
Value: The image bits per pixel count.getBitsPerPixel
in class Image
public String getComment()
Gets or sets the jpeg file comment.
public void setComment(String value)
Gets or sets the jpeg file comment.
public JpegExifData getExifData()
Get or set exif data container
public void setExifData(JpegExifData value)
Get or set exif data container
public XmpPacketWrapper getXmpData()
Gets or sets the XMP metadata.
Value: The XMP metadata.getXmpData
in class RasterImage
public void setXmpData(XmpPacketWrapper value)
Gets or sets the XMP metadata.
Value: The XMP metadata.setXmpData
in class RasterImage
public int getHeight()
Gets the image height.
Value: The image height.getHeight
in interface IObjectWithBounds
getHeight
in class Image
public double getHorizontalResolution()
Gets or sets the horizontal resolution, in pixels per inch, of this RasterImage
.
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.
getHorizontalResolution
in class RasterImage
public void setHorizontalResolution(double value)
Gets or sets the horizontal resolution, in pixels per inch, of this RasterImage
.
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
in class RasterImage
public com.aspose.imaging.fileformats.jpeg.JFIFData getJfif()
Gets or sets the jfif.
public void setJfif(com.aspose.imaging.fileformats.jpeg.JFIFData value)
Gets or sets the jfif.
public PixelDataFormat getRawDataFormat()
Gets the raw data format.
getRawDataFormat
in class RasterImage
public double getVerticalResolution()
Gets or sets the vertical resolution, in pixels per inch, of this RasterImage
.
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.
getVerticalResolution
in class RasterImage
public void setVerticalResolution(double value)
Gets or sets the vertical resolution, in pixels per inch, of this RasterImage
.
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
in class RasterImage
public int getWidth()
Gets the image width.
Value: The image width.getWidth
in interface IObjectWithBounds
getWidth
in class Image
public StreamSource getRgbColorProfile()
The RGB color profile for CMYK and YCCK jpeg images. Must be in pair with CMYKColorProfile for correct color conversion.
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.
public StreamSource getCmykColorProfile()
The CMYK color profile for CMYK and YCCK jpeg images. Must be in pair with RGBColorProfile for correct color conversion.
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.
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.
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.
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.
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.
public boolean getIgnoreEmbeddedColorProfile()
Gets or sets a value indicating whether embedded color profile is ignored. If embedded color profile is ignored, dafault color profile is used.
public void setIgnoreEmbeddedColorProfile(boolean value)
Gets or sets a value indicating whether embedded color profile is ignored. If embedded color profile is ignored, dafault color profile is used.
public void setResolution(double dpiX, double dpiY)
Sets the resolution for this RasterImage
.
setResolution
in class RasterImage
dpiX
- The horizontal resolution, in dots per inch, of the RasterImage
.dpiY
- The vertical resolution, in dots per inch, of the RasterImage
.public void autoRotate()
Perform automatic rotate of image depending on orientation data provided by Exif.
public static byte[] app1Data_internalized(JpegExifData exifData)
The app 1 data.
exifData
- The exif Data.System.Byte[]
.public static byte[] app1Data_internalized(XmpPacketWrapper xmpData)
Gets the prepared App1 data block for XMP metadata
xmpData
- The XMP data.com.aspose.ms.System.ArgumentNullException
- xmpData is null.JpegException
- XMP could not be grater than package maximum length bytespublic static void saveJpeg_internalized(RasterImage imageToSave, com.aspose.ms.System.IO.Stream stream, com.aspose.imaging.fileformats.jpeg.JFIFData jfifData, JpegExifData exifData, XmpPacketWrapper xmpData, JpegOptions options, Rectangle destImageBounds)
The save jpeg to stream.
imageToSave
- The image to save.stream
- The stream.jfifData
- The jfif Data.exifData
- The exif Data.xmpData
- The XMP Data.options
- Compression options.destImageBounds
- The dest image bounds.public static JpegImage createInstance_internalized(int width, int height, int pixelFormat, IRasterImageArgb32PixelLoader jpegDataReader)
Creates the new instance of the JpegImage
class.
width
- The width.height
- The height.pixelFormat
- The pixel format.jpegDataReader
- The JPEG data reader.JpegImage
class.Copyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.