Package org.verapdf.external
Class ICCProfile
- java.lang.Object
-
- org.verapdf.pd.PDObject
-
- org.verapdf.external.ICCProfile
-
public class ICCProfile extends PDObject
- Author:
- Maksim Bezrukov
-
-
Field Summary
Fields Modifier and Type Field Description static intCMM_TYPE_OFFSETOffset of cmm type in headerstatic intCOLOR_SPACE_OFFSETOffset of color space in headerstatic intCREATOR_OFFSETOffset of creator in headerstatic intDEVICE_CLASS_OFFSETOffset of device class in headerstatic intDEVICE_MANUFACTURER_OFFSETOffset of device manufacturer in headerstatic intDEVICE_MODEL_OFFSETOffset of device model in headerstatic intHEADER_LENGTHLength of icc profile headerstatic intPROFILE_ID_LENGTHExpected length for profile idstatic intPROFILE_ID_OFFSETOffset of profile id in headerstatic intRENDERING_INTENT_OFFSETOffset of rendering intent in headerstatic intREQUIRED_LENGTHExpected length for device class and so onstatic intSUBVERSION_BYTEOffset of subversion bytestatic intTAGINFO_LENGTHLength of icc profile tag infostatic intVERSION_BYTEOffset of version bytestatic intVERSION_LENGTHExpected length version
-
Constructor Summary
Constructors Constructor Description ICCProfile(COSObject profileStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDColorSpacegetAlternate()StringgetCMMType()StringgetColorSpace()StringgetCopyright()CalendargetCreationDate()StringgetCreator()StringgetDescription()StringgetDeviceClass()StringgetDeviceManufacturer()StringgetDeviceModel()StringgetMD5()PDMetadatagetMetadata()LonggetNumberOfColorants()StringgetProfileID()double[]getRange()StringgetRenderingIntent()DoublegetVersion()booleanisLooksValid()-
Methods inherited from class org.verapdf.pd.PDObject
clear, empty, getBooleanKey, getIntegerKey, getKey, getNameKey, getObject, getRealKey, getStringKey, knownKey, removeKey, setBooleanKey, setIntegerKey, setKey, setNameKey, setObject, setObject, setStringKey, updateFromObject, updateToObject
-
-
-
-
Field Detail
-
HEADER_LENGTH
public static final int HEADER_LENGTH
Length of icc profile header- See Also:
- Constant Field Values
-
TAGINFO_LENGTH
public static final int TAGINFO_LENGTH
Length of icc profile tag info- See Also:
- Constant Field Values
-
CMM_TYPE_OFFSET
public static final int CMM_TYPE_OFFSET
Offset of cmm type in header- See Also:
- Constant Field Values
-
DEVICE_CLASS_OFFSET
public static final int DEVICE_CLASS_OFFSET
Offset of device class in header- See Also:
- Constant Field Values
-
COLOR_SPACE_OFFSET
public static final int COLOR_SPACE_OFFSET
Offset of color space in header- See Also:
- Constant Field Values
-
DEVICE_MANUFACTURER_OFFSET
public static final int DEVICE_MANUFACTURER_OFFSET
Offset of device manufacturer in header- See Also:
- Constant Field Values
-
DEVICE_MODEL_OFFSET
public static final int DEVICE_MODEL_OFFSET
Offset of device model in header- See Also:
- Constant Field Values
-
RENDERING_INTENT_OFFSET
public static final int RENDERING_INTENT_OFFSET
Offset of rendering intent in header- See Also:
- Constant Field Values
-
CREATOR_OFFSET
public static final int CREATOR_OFFSET
Offset of creator in header- See Also:
- Constant Field Values
-
PROFILE_ID_OFFSET
public static final int PROFILE_ID_OFFSET
Offset of profile id in header- See Also:
- Constant Field Values
-
REQUIRED_LENGTH
public static final int REQUIRED_LENGTH
Expected length for device class and so on- See Also:
- Constant Field Values
-
PROFILE_ID_LENGTH
public static final int PROFILE_ID_LENGTH
Expected length for profile id- See Also:
- Constant Field Values
-
VERSION_LENGTH
public static final int VERSION_LENGTH
Expected length version- See Also:
- Constant Field Values
-
VERSION_BYTE
public static final int VERSION_BYTE
Offset of version byte- See Also:
- Constant Field Values
-
SUBVERSION_BYTE
public static final int SUBVERSION_BYTE
Offset of subversion byte- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ICCProfile
public ICCProfile(COSObject profileStream)
-
-
Method Detail
-
getMD5
public String getMD5()
-
isLooksValid
public boolean isLooksValid()
- Returns:
- true if all necessary fields can be obtained from icc profile header
-
getDeviceClass
public String getDeviceClass()
- Returns:
- string representation of device class or null, if profile length is too small
-
getColorSpace
public String getColorSpace()
- Returns:
- string representation of color space or null, if profile length is too small
-
getCMMType
public String getCMMType()
- Returns:
- string representation of cmm type or null, if profile length is too small
-
getCreator
public String getCreator()
- Returns:
- string representation of creator or null, if profile length is too small
-
getCreationDate
public Calendar getCreationDate()
- Returns:
- calendar representation of creation date or null, if profile length is too small or contains zero value of creation date
-
getRenderingIntent
public String getRenderingIntent()
- Returns:
- string representation of rendering intent or null, if profile length is too small
-
getProfileID
public String getProfileID()
- Returns:
- string representation of profile id or null, if profile length is too small
-
getDeviceModel
public String getDeviceModel()
- Returns:
- string representation of device model or null, if profile length is too small
-
getDeviceManufacturer
public String getDeviceManufacturer()
- Returns:
- string representation of device manufacturer or null, if profile length is too small
-
getVersion
public Double getVersion()
- Returns:
- version of ICC profile or null, if profile length is too small
-
getCopyright
public String getCopyright()
- Returns:
- copyright of ICC profile or null, if profile length is too small or tag is missing
-
getDescription
public String getDescription()
- Returns:
- description of ICC profile or null, if profile length is too small or tag is missing
-
getNumberOfColorants
public Long getNumberOfColorants()
- Returns:
- number of colorants for ICC profile, described in profile dictionary
-
getRange
public double[] getRange()
- Returns:
- range array value for ICC profile, described in profile dictionary
-
getAlternate
public PDColorSpace getAlternate()
-
getMetadata
public PDMetadata getMetadata()
-
-