public final class JpegImage extends RasterCachedImage
A jpeg image.
RasterCachedImage.RotateTestMode
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 |
---|---|
void |
autoRotate()
Perform automatic rotate of image depending on orientation data provided by Exif.
|
int |
getBitsPerPixel()
Gets the image bits per pixel count.
|
StreamSource |
getCmykColorProfile()
The CMYK color profile for CMYK and YCCK jpeg images.
|
String |
getComment()
Gets 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
|
long |
getFileFormat()
Gets a value of file format
|
int |
getHeight()
Gets the image height.
|
double |
getHorizontalResolution()
Gets the horizontal resolution, in pixels per inch, of this
RasterImage . |
boolean |
getIgnoreEmbeddedColorProfile()
Gets a value indicating whether embedded color profile is ignored.
|
JFIFData |
getJfif()
Gets 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 the vertical resolution, in pixels per inch, of this
RasterImage . |
int |
getWidth()
Gets the image width.
|
XmpPacketWrapper |
getXmpData()
Gets the XMP metadata.
|
void |
setCmykColorProfile(StreamSource value)
The CMYK color profile for CMYK and YCCK jpeg images.
|
void |
setComment(String value)
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)
Sets the horizontal resolution, in pixels per inch, of this
RasterImage . |
void |
setIgnoreEmbeddedColorProfile(boolean value)
Sets a value indicating whether embedded color profile is ignored.
|
void |
setJfif(JFIFData value)
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)
Sets the vertical resolution, in pixels per inch, of this
RasterImage . |
void |
setXmpData(XmpPacketWrapper value)
Sets the XMP metadata.
|
adjustBrightness, adjustContrast, adjustGamma, adjustGamma, binarizeBradley, binarizeBradley, binarizeFixed, binarizeOtsu, cacheData, crop, dither, getMaxAllowedAllocationForPartialRotateSave, getRotateMode, grayscale, isCached, resize, resize, rotate, rotateFlip, setMaxAllowedAllocationForPartialRotateSave, setRotateMode
crop, dither, filter, getArgb32Pixel, getDefaultArgb32Pixels, getDefaultPixels, getDefaultRawData, getDefaultRawData, getImageOpacity, getModifyDate, getPixel, getPremultiplyComponents, getRawCustomColorConverter, getRawDataSettings, getRawFallbackIndex, getRawIndexedColorConverter, getRawLineSize, getTransparentColor, getUpdateXmpData, getUseRawData, hasAlpha, hasTransparentColor, isRawDataAvailable, loadArgb32Pixels, loadArgb64Pixels, loadCmyk32Pixels, loadCmykPixels, loadPartialArgb32Pixels, loadPartialPixels, loadPixels, loadRawData, loadRawData, readArgb32ScanLine, readScanLine, replaceColor, replaceColor, replaceNonTransparentColors, replaceNonTransparentColors, rotate, saveArgb32Pixels, saveCmyk32Pixels, saveCmykPixels, savePixels, saveRawData, setArgb32Pixel, setPalette, setPixel, setPremultiplyComponents, setRawCustomColorConverter, setRawFallbackIndex, setRawIndexedColorConverter, setTransparentColor, setTransparentColor, setUpdateXmpData, setUseRawData, toBitmap, writeArgb32ScanLine, writeScanLine
canLoad, canLoad, canLoad, canLoad, canSave, create, getBackgroundColor, getBounds, getContainer, getDefaultOptions, getFileFormat, getFileFormat, getFittingRectangle, getFittingRectangle, getInterruptMonitor, getOriginalOptions, getPalette, getProportionalHeight, getProportionalWidth, getSize, hasBackgroundColor, isAutoAdjustPalette, load, load, load, load, load, load, resize, resizeHeightProportionally, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, resizeWidthProportionally, save, save, save, save, save, save, save, setAutoAdjustPalette, setBackgroundColor, setBackgroundColor, setInterruptMonitor, setPalette
getDataStreamContainer, save, save, save, save
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 long getFileFormat()
Gets a value of file format
getFileFormat
in class Image
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.
getBitsPerPixel
in class Image
public String getComment()
Gets the jpeg file comment.
public void setComment(String value)
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 the XMP metadata.
getXmpData
in class RasterImage
public void setXmpData(XmpPacketWrapper value)
Sets the XMP metadata.
setXmpData
in class RasterImage
value
- The XMP metadata.public int getHeight()
Gets the image height.
getHeight
in interface IObjectWithBounds
getHeight
in class Image
public double getHorizontalResolution()
Gets the horizontal resolution, in pixels per inch, of this RasterImage
.
getHorizontalResolution
in class 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.
public void setHorizontalResolution(double value)
Sets the horizontal resolution, in pixels per inch, of this RasterImage
.
setHorizontalResolution
in class RasterImage
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.
public JFIFData getJfif()
Gets the jfif.
public void setJfif(JFIFData value)
Sets the jfif.
public PixelDataFormat getRawDataFormat()
Gets the raw data format.
getRawDataFormat
in class RasterImage
public double getVerticalResolution()
Gets the vertical resolution, in pixels per inch, of this RasterImage
.
getVerticalResolution
in class 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.
public void setVerticalResolution(double value)
Sets the vertical resolution, in pixels per inch, of this RasterImage
.
setVerticalResolution
in class RasterImage
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.
public int getWidth()
Gets 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 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)
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.
Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.