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 int
CMM_TYPE_OFFSET
Offset of cmm type in headerstatic int
COLOR_SPACE_OFFSET
Offset of color space in headerstatic int
CREATOR_OFFSET
Offset of creator in headerstatic int
DEVICE_CLASS_OFFSET
Offset of device class in headerstatic int
DEVICE_MANUFACTURER_OFFSET
Offset of device manufacturer in headerstatic int
DEVICE_MODEL_OFFSET
Offset of device model in headerstatic int
HEADER_LENGTH
Length of icc profile headerstatic int
PROFILE_ID_LENGTH
Expected length for profile idstatic int
PROFILE_ID_OFFSET
Offset of profile id in headerstatic int
RENDERING_INTENT_OFFSET
Offset of rendering intent in headerstatic int
REQUIRED_LENGTH
Expected length for device class and so onstatic int
SUBVERSION_BYTE
Offset of subversion bytestatic int
TAGINFO_LENGTH
Length of icc profile tag infostatic int
VERSION_BYTE
Offset of version bytestatic int
VERSION_LENGTH
Expected length version
-
Constructor Summary
Constructors Constructor Description ICCProfile(COSObject profileStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDColorSpace
getAlternate()
String
getCMMType()
String
getColorSpace()
String
getCopyright()
Calendar
getCreationDate()
String
getCreator()
String
getDescription()
String
getDeviceClass()
String
getDeviceManufacturer()
String
getDeviceModel()
String
getMD5()
PDMetadata
getMetadata()
Long
getNumberOfColorants()
String
getProfileID()
double[]
getRange()
String
getRenderingIntent()
Double
getVersion()
boolean
isLooksValid()
-
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()
-
-