Class ICCProfileWrapper
- java.lang.Object
-
- org.apache.pdfbox.preflight.graphic.ICCProfileWrapper
-
public class ICCProfileWrapper extends java.lang.ObjectThis class embeds an instance of java.awt.color.ICC_Profile which represent the ICCProfile defined by the DestOutputItents key of the OutputIntents of the PDF.
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.color.ICC_ColorSpacecolorSpaceThe ICC ColorSpace created using the ICCProfileprivate java.awt.color.ICC_ProfileprofileThe ICCProfile extracted from DestOutputItents
-
Constructor Summary
Constructors Constructor Description ICCProfileWrapper(java.awt.color.ICC_Profile _profile)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColorSpaceType()Call the ICC_ColorSpace.getType method and return the value.static ICCProfileWrappergetOrSearchICCProfile(PreflightContext context)java.awt.color.ICC_ProfilegetProfile()booleanisCMYKColorSpace()Return true if the ColourSpace is CMYKbooleanisGrayColorSpace()Return true if the ColourSpace is Gray scalebooleanisRGBColorSpace()Return true if the ColourSpace is RGBprivate static ICCProfileWrappersearchFirstICCProfile(PreflightContext context)This method read all outputIntent dictionary until on of them have a destOutputProfile stream.
-
-
-
Method Detail
-
getColorSpaceType
public int getColorSpaceType()
Call the ICC_ColorSpace.getType method and return the value.- Returns:
- the color space type.
-
getProfile
public java.awt.color.ICC_Profile getProfile()
- Returns:
- the profile
-
isRGBColorSpace
public boolean isRGBColorSpace()
Return true if the ColourSpace is RGB- Returns:
- true if the ColourSpace is RGB.
-
isCMYKColorSpace
public boolean isCMYKColorSpace()
Return true if the ColourSpace is CMYK- Returns:
- true if the ColourSpace is CMYK.
-
isGrayColorSpace
public boolean isGrayColorSpace()
Return true if the ColourSpace is Gray scale- Returns:
- true if the ColourSpace is gray scale.
-
searchFirstICCProfile
private static ICCProfileWrapper searchFirstICCProfile(PreflightContext context)
This method read all outputIntent dictionary until on of them have a destOutputProfile stream. This stream is parsed and is used to create a IccProfileWrapper.- Parameters:
context-- Returns:
- an instance of ICCProfileWrapper or null if there are no DestOutputProfile
-
getOrSearchICCProfile
public static ICCProfileWrapper getOrSearchICCProfile(PreflightContext context) throws ValidationException
- Throws:
ValidationException
-
-