Class ImageRawJPEG
java.lang.Object
org.apache.xmlgraphics.image.loader.impl.AbstractImage
org.apache.xmlgraphics.image.loader.impl.ImageRawStream
org.apache.xmlgraphics.image.loader.impl.ImageRawJPEG
- All Implemented Interfaces:
Image
This class is an implementation of the Image interface exposing a JPEG file. It provides an
InputStream to access the JPEG content and some additional information on the image.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.xmlgraphics.image.loader.impl.ImageRawStream
ImageRawStream.ByteArrayStreamFactory, ImageRawStream.InputStreamFactory
-
Constructor Summary
ConstructorsConstructorDescriptionImageRawJPEG
(ImageInfo info, InputStream in, int sofType, ColorSpace colorSpace, ICC_Profile iccProfile, boolean invertImage) Main constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the image's color spaceReturns the ICC color profile if one is associated with the JPEG image.int
Returns the SOFn identifier of the image which describes the coding format of the image.boolean
Indicates whether the image should be inverted when interpreting it.Methods inherited from class org.apache.xmlgraphics.image.loader.impl.ImageRawStream
createInputStream, getFlavor, getMimeType, isCacheable, setInputStreamFactory, writeTo
Methods inherited from class org.apache.xmlgraphics.image.loader.impl.AbstractImage
getInfo, getSize, toString
-
Constructor Details
-
ImageRawJPEG
public ImageRawJPEG(ImageInfo info, InputStream in, int sofType, ColorSpace colorSpace, ICC_Profile iccProfile, boolean invertImage) Main constructor.- Parameters:
info
- the image info objectin
- the ImageInputStream with the raw contentsofType
- the SOFn identifiercolorSpace
- the color spaceiccProfile
- an ICC color profile or null if no profile is associatedinvertImage
- true if the image should be inverted when painting it
-
-
Method Details
-
getSOFType
public int getSOFType()Returns the SOFn identifier of the image which describes the coding format of the image.- Returns:
- the SOFn identifier
-
getICCProfile
Returns the ICC color profile if one is associated with the JPEG image.- Specified by:
getICCProfile
in interfaceImage
- Overrides:
getICCProfile
in classAbstractImage
- Returns:
- the ICC color profile or null if there's no profile
-
isInverted
public boolean isInverted()Indicates whether the image should be inverted when interpreting it.- Returns:
- true if the image is to be inverted
-
getColorSpace
Returns the image's color space- Specified by:
getColorSpace
in interfaceImage
- Overrides:
getColorSpace
in classAbstractImage
- Returns:
- the color space
-