|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--icc.ICCProfile
This class models the ICCProfile file. This file is a binary file which is divided into two parts, an ICCProfileHeader followed by an ICCTagTable. The header is a straightforward list of descriptive parameters such as profile size, version, date and various more esoteric parameters. The tag table is a structured list of more complexly aggragated data describing things such as ICC curves, copyright information, descriptive text blocks, etc. Classes exist to model the header and tag table and their various constituent parts the developer is refered to these for further information on the structure and contents of the header and tag table.
jj2000.j2k.icc.types.ICCProfileHeader
,
jj2000.j2k.icc.tags.ICCTagTable
Nested Class Summary | |
private static class |
ICCProfile.BoxType
|
Field Summary | |
static int |
BITS_PER_BYTE
|
static int |
BITS_PER_INT
|
static int |
BITS_PER_LONG
|
static int |
BITS_PER_SHORT
|
static int |
BLUE
RGB index. |
static int |
boolean_size
Size of native type |
static int |
byte_size
Size of native type |
static int |
BYTES_PER_INT
|
static int |
BYTES_PER_LONG
|
static int |
BYTES_PER_SHORT
|
static int |
char_size
Size of native type |
private byte[] |
data
|
static int |
double_size
Size of native type |
private static java.lang.String |
eol
|
static int |
float_size
Size of native type |
static int |
GRAY
Gray index. |
static int |
GREEN
RGB index. |
private ICCProfileHeader |
header
|
static int |
int_size
Size of native type |
static int |
kdwBlueColorantTag
tag signature |
static int |
kdwBlueTRCTag
tag signature |
static int |
kdwCopyrightTag
tag signature |
static int |
kdwDisplayProfile
tag type |
static int |
kdwGrayData
tag type |
static int |
kdwGrayTRCTag
tag signature |
static int |
kdwGreenColorantTag
tag signature |
static int |
kdwGreenTRCTag
tag signature |
static int |
kdwInputProfile
profile type |
static int |
kdwMediaWhiteTag
tag signature |
static int |
kdwProfileDescTag
tag signature |
static int |
kdwProfileSignature
signature |
static int |
kdwProfileSigReverse
signature |
static int |
kdwRedColorantTag
tag signature |
static int |
kdwRedTRCTag
tag signature |
static int |
kdwRGBData
tag type |
static int |
kdwXYZData
tag type |
static int |
kMonochromeInput
input type |
static int |
kThreeCompInput
input type |
static int |
long_size
Size of native type |
private ParameterList |
pl
|
private byte[] |
profile
|
static int |
RED
RGB index. |
static int |
short_size
Size of native type |
private ICCTagTable |
tags
|
Constructor Summary | |
private |
ICCProfile()
|
protected |
ICCProfile(ColorSpace csm)
ParameterList constructor |
Method Summary | |
private int |
getCMMFlags()
|
private int |
getCMMTypeSignature()
|
private int |
getColorSpaceType()
|
private int |
getCreatorSig()
|
private int |
getDeviceAttributes1()
|
private int |
getDeviceAttributesReserved()
|
private int |
getDeviceManufacturer()
|
private int |
getDeviceModel()
|
ICCProfileHeader |
getHeader()
Access the profile header |
static ICCDateTime |
getICCDateTime(byte[] data,
int offset)
Create an ICCDateTime from byte [] input |
static ICCProfileVersion |
getICCProfileVersion(byte[] data,
int offset)
Create an ICCProfileVersion from byte [] input |
static int |
getInt(byte[] bfr,
int off)
Create an int from a byte [4]. |
static int |
getInt(byte[] bfr,
int off,
boolean swap)
Create an int from a byte [4], with optional byte swapping. |
static int |
getIntFromString(java.lang.String fourChar)
Creates an int from a 4 character String |
static long |
getLong(byte[] bfr,
int off)
Create an long from a byte [8]. |
private int |
getPCSType()
|
private int |
getPlatformSignature()
|
private int |
getProfileClass()
|
private int |
getProfileSignature()
|
private int |
getProfileSize()
|
private ICCProfileVersion |
getProfileVersion()
|
private int |
getRenderingIntent()
|
static short |
getShort(byte[] bfr,
int off)
Create a short from a two byte []. |
static short |
getShort(byte[] bfr,
int off,
boolean swap)
Create a short from a two byte [], with optional byte swapping. |
static java.lang.String |
getString(byte[] bfr,
int offset,
int length,
boolean swap)
Create a String from a byte []. |
ICCTagTable |
getTagTable()
Access the profile tag table |
static XYZNumber |
getXYZNumber(byte[] data,
int offset)
Create an XYZNumber from byte [] input |
private void |
initProfile(byte[] data)
Read the header and tags into memory and verify that the correct type of profile is being used. |
RestrictedICCProfile |
parse()
Parse this ICCProfile into a RestrictedICCProfile which is appropriate to the data in this profile. |
private void |
setCMMFlags(int cmmflags)
|
private void |
setCMMTypeSignature(int cmmsig)
|
private void |
setColorSpaceType(int colorspace)
|
private void |
setCreatorSig(int creatorsig)
|
private void |
setDateTime(ICCDateTime datetime)
|
private void |
setDeviceAttributes1(int attr1)
|
private void |
setDeviceAttributesReserved(int attrreserved)
|
private void |
setDeviceManufacturer(int manufacturer)
|
private void |
setDeviceModel(int model)
|
static byte[] |
setInt(int d)
Separate bytes in an int into a byte array lsb to msb order. |
static byte[] |
setInt(int d,
byte[] b)
Separate bytes in an int into a byte array lsb to msb order. |
static byte[] |
setLong(long d)
Separate bytes in a long into a byte array lsb to msb order. |
static byte[] |
setLong(long d,
byte[] b)
Separate bytes in a long into a byte array lsb to msb order. |
private void |
setPCSIlluminant(XYZNumber xyz)
|
private void |
setPCSType(int PCStype)
|
private void |
setPlatformSignature(int platformsig)
|
private void |
setProfileClass(int pclass)
|
private void |
setProfileSignature(int profilesig)
|
private void |
setProfileSize(int size)
|
private void |
setProfileVersion(ICCProfileVersion version)
|
private void |
setRenderingIntent(int rendering)
|
static java.lang.String |
toHexString(byte i)
Create a two character hex representation of a byte |
static java.lang.String |
toHexString(int i)
Create a 8 character hex representation of a int |
static java.lang.String |
toHexString(short i)
Create a 4 character hex representation of a short |
java.lang.String |
toString()
Provide a suitable string representation for the class |
static java.lang.String |
toString(byte[] data)
|
void |
write(java.io.RandomAccessFile os)
Output this ICCProfile to a RandomAccessFile |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final java.lang.String eol
public static final int GRAY
public static final int RED
public static final int GREEN
public static final int BLUE
public static final int boolean_size
public static final int byte_size
public static final int char_size
public static final int short_size
public static final int int_size
public static final int float_size
public static final int long_size
public static final int double_size
public static final int BITS_PER_BYTE
public static final int BITS_PER_SHORT
public static final int BITS_PER_INT
public static final int BITS_PER_LONG
public static final int BYTES_PER_SHORT
public static final int BYTES_PER_INT
public static final int BYTES_PER_LONG
public static final int kdwProfileSignature
public static final int kdwProfileSigReverse
public static final int kdwInputProfile
public static final int kdwDisplayProfile
public static final int kdwRGBData
public static final int kdwGrayData
public static final int kdwXYZData
public static final int kMonochromeInput
public static final int kThreeCompInput
public static final int kdwGrayTRCTag
public static final int kdwRedColorantTag
public static final int kdwGreenColorantTag
public static final int kdwBlueColorantTag
public static final int kdwRedTRCTag
public static final int kdwGreenTRCTag
public static final int kdwBlueTRCTag
public static final int kdwCopyrightTag
public static final int kdwMediaWhiteTag
public static final int kdwProfileDescTag
private ICCProfileHeader header
private ICCTagTable tags
private byte[] profile
private byte[] data
private ParameterList pl
Constructor Detail |
private ICCProfile() throws ICCProfileException
protected ICCProfile(ColorSpace csm) throws ColorSpaceException, ICCProfileInvalidException
Method Detail |
public static int getIntFromString(java.lang.String fourChar)
fourChar
- string representation of an integer
public static XYZNumber getXYZNumber(byte[] data, int offset)
data
- array containing the XYZNumber representationoffset
- start of the rep in the array
public static ICCProfileVersion getICCProfileVersion(byte[] data, int offset)
data
- array containing the ICCProfileVersion representationoffset
- start of the rep in the array
public static ICCDateTime getICCDateTime(byte[] data, int offset)
data
- array containing the ICCProfileVersion representationoffset
- start of the rep in the array
public static java.lang.String getString(byte[] bfr, int offset, int length, boolean swap)
bfr
- data arrayoffset
- start of data in arraylength
- length of data in arrayswap
- swap adjacent bytes?
public static short getShort(byte[] bfr, int off, boolean swap)
bfr
- data arrayoff
- start of data in arrayswap
- swap bytes?
public static short getShort(byte[] bfr, int off)
bfr
- data arrayoff
- start of data in array
public static byte[] setInt(int d)
d
- integer to separate
public static byte[] setInt(int d, byte[] b)
d
- integer to separateb
- return output here.
public static byte[] setLong(long d)
d
- long to separate
public static byte[] setLong(long d, byte[] b)
d
- long to separateb
- return output here.
public static int getInt(byte[] bfr, int off, boolean swap)
bfr
- data arrayoff
- start of data in arrayswap
- swap bytes?
public static int getInt(byte[] bfr, int off)
bfr
- data arrayoff
- start of data in array
public static long getLong(byte[] bfr, int off)
bfr
- data arrayoff
- start of data in array
private int getProfileSize()
private int getCMMTypeSignature()
private int getProfileClass()
private int getColorSpaceType()
private int getPCSType()
private int getProfileSignature()
private int getPlatformSignature()
private int getCMMFlags()
private int getDeviceManufacturer()
private int getDeviceModel()
private int getDeviceAttributes1()
private int getDeviceAttributesReserved()
private int getRenderingIntent()
private int getCreatorSig()
private ICCProfileVersion getProfileVersion()
private void setProfileSignature(int profilesig)
private void setProfileSize(int size)
private void setCMMTypeSignature(int cmmsig)
private void setProfileClass(int pclass)
private void setColorSpaceType(int colorspace)
private void setPCSIlluminant(XYZNumber xyz)
private void setPCSType(int PCStype)
private void setPlatformSignature(int platformsig)
private void setCMMFlags(int cmmflags)
private void setDeviceManufacturer(int manufacturer)
private void setDeviceModel(int model)
private void setDeviceAttributes1(int attr1)
private void setDeviceAttributesReserved(int attrreserved)
private void setRenderingIntent(int rendering)
private void setCreatorSig(int creatorsig)
private void setProfileVersion(ICCProfileVersion version)
private void setDateTime(ICCDateTime datetime)
private void initProfile(byte[] data) throws ICCProfileInvalidException
data
- ICCProfile
ICCProfileInvalidException
- for bad signature and class and bad typepublic java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String toHexString(byte i)
i
- byte to represent
public static java.lang.String toHexString(short i)
i
- short to represent
public static java.lang.String toHexString(int i)
i
- int to represent
public static java.lang.String toString(byte[] data)
public ICCProfileHeader getHeader()
public ICCTagTable getTagTable()
public RestrictedICCProfile parse() throws ICCProfileInvalidException
ICCProfileInvalidException
- no curve datapublic void write(java.io.RandomAccessFile os) throws java.io.IOException
os
- output file
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |