A representation of color profile data for device independent and
device dependent color spaces based on the International Color
Consortium Specification ICC.1:2001-12, File Format for Color Profiles,
(see
http://www.color.org).
An ICC_ColorSpace object can be constructed from an appropriate
ICC_Profile.
Typically, an ICC_ColorSpace would be associated with an ICC
Profile which is either an input, display, or output profile (see
the ICC specification). There are also device link, abstract,
color space conversion, and named color profiles. These are less
useful for tagging a color or image, but are useful for other
purposes (in particular device link profiles can provide improved
performance for converting from one device's color space to
another's).
ICC Profiles represent transformations from the color space of
the profile (e.g. a monitor) to a Profile Connection Space (PCS).
Profiles of interest for tagging images or colors have a PCS
which is one of the two specific device independent
spaces (one CIEXYZ space and one CIELab space) defined in the
ICC Profile Format Specification. Most profiles of interest
either have invertible transformations or explicitly specify
transformations going both directions.
Profile class is abstract.
Profile class is color space conversion.
Profile class is device link.
Profile class is display.
Profile class is named color.
ICC Profile Rendering Intent: AbsoluteColorimetric.
ICC Profile Constant: curveType count.
ICC Profile Constant: curveType data.
ICC Profile Header Location: device attributes.
ICC Profile Header Location: CMM for this profile.
ICC Profile Header Location: color space of data.
ICC Profile Header Location: profile creator.
ICC Profile Header Location: date profile was created.
ICC Profile Header Location: type of profile.
ICC Profile Header Location: various bit settings.
ICC Profile Header Location: profile illuminant.
ICC Profile Header Location: icMagicNumber.
ICC Profile Header Location: device manufacturer.
ICC Profile Header Location: device model number.
ICC Profile Header Location: PCS - XYZ or Lab only.
ICC Profile Header Location: primary platform.
ICC Profile Header Location: profile's ID.
ICC Profile Header Location: rendering intent.
ICC Profile Header Location: profile size in bytes.
ICC Profile Header Location: format version number.
ICC Profile Rendering Intent: ICC-AbsoluteColorimetric.
ICC Profile Rendering Intent: Media-RelativeColorimetric.
ICC Profile Rendering Intent: Perceptual.
ICC Profile Rendering Intent: RelativeColorimetric.
ICC Profile Rendering Intent: Saturation.
ICC Profile Class Signature: 'abst'.
ICC Profile Tag Signature: 'A2B0'.
ICC Profile Tag Signature: 'A2B1'.
ICC Profile Tag Signature: 'A2B2'.
ICC Profile Tag Signature: 'bXYZ'.
ICC Profile Tag Signature: 'bXYZ'.
ICC Profile Tag Signature: 'bTRC'.
ICC Profile Tag Signature: 'B2A0'.
ICC Profile Tag Signature: 'B2A1'.
ICC Profile Tag Signature: 'B2A2'.
ICC Profile Tag Signature: 'calt'.
ICC Profile Tag Signature: 'targ'.
ICC Profile Tag Signature: 'chad'.
ICC Profile Tag Signature: 'chrm'.
ICC Profile Color Space Type Signature: 'CMY '.
ICC Profile Color Space Type Signature: 'CMYK'.
ICC Profile Tag Signature: 'clro'.
ICC Profile Tag Signature: 'clrt'.
ICC Profile Class Signature: 'spac'.
ICC Profile Tag Signature: 'cprt'.
ICC Profile Tag Signature: 'crdi'.
ICC Profile Tag Signature: 'dmnd'.
ICC Profile Tag Signature: 'dmdd'.
ICC Profile Tag Signature: 'devs'.
ICC Profile Class Signature: 'mntr'.
ICC Profile Tag Signature: 'gamt'.
ICC Profile Color Space Type Signature: 'GRAY'.
ICC Profile Tag Signature: 'kTRC'.
ICC Profile Tag Signature: 'gXYZ'.
ICC Profile Tag Signature: 'gXYZ'.
ICC Profile Tag Signature: 'gTRC'.
ICC Profile Tag Signature: 'head' - special.
ICC Profile Color Space Type Signature: 'HLS'.
ICC Profile Color Space Type Signature: 'HSV'.
ICC Profile Class Signature: 'scnr'.
ICC Profile Color Space Type Signature: 'Lab '.
ICC Profile Class Signature: 'link'.
ICC Profile Tag Signature: 'lumi'.
ICC Profile Color Space Type Signature: 'Luv '.
ICC Profile Tag Signature: 'meas'.
ICC Profile Tag Signature: 'bkpt'.
ICC Profile Tag Signature: 'wtpt'.
ICC Profile Tag Signature: 'ncl2'.
ICC Profile Class Signature: 'nmcl'.
ICC Profile Class Signature: 'prtr'.
ICC Profile Tag Signature: 'resp'.
ICC Profile Tag Signature: 'pre0'.
ICC Profile Tag Signature: 'pre1'.
ICC Profile Tag Signature: 'pre2'.
ICC Profile Tag Signature: 'desc'.
ICC Profile Tag Signature: 'pseq'.
ICC Profile Tag Signature: 'psd0'.
ICC Profile Tag Signature: 'psd1'.
ICC Profile Tag Signature: 'psd2'.
ICC Profile Tag Signature: 'psd3'.
ICC Profile Tag Signature: 'ps2s'.
ICC Profile Tag Signature: 'ps2i'.
ICC Profile Tag Signature: 'rXYZ'.
ICC Profile Tag Signature: 'rXYZ'.
ICC Profile Tag Signature: 'rTRC'.
ICC Profile Color Space Type Signature: 'RGB '.
ICC Profile Tag Signature: 'scrd'.
ICC Profile Tag Signature: 'scrn'.
ICC Profile Color Space Type Signature: '2CLR'.
ICC Profile Color Space Type Signature: '3CLR'.
ICC Profile Color Space Type Signature: '4CLR'.
ICC Profile Color Space Type Signature: '5CLR'.
ICC Profile Color Space Type Signature: '6CLR'.
ICC Profile Color Space Type Signature: '7CLR'.
ICC Profile Color Space Type Signature: '8CLR'.
ICC Profile Color Space Type Signature: '9CLR'.
ICC Profile Color Space Type Signature: 'ACLR'.
ICC Profile Color Space Type Signature: 'BCLR'.
ICC Profile Color Space Type Signature: 'CCLR'.
ICC Profile Color Space Type Signature: 'DCLR'.
ICC Profile Color Space Type Signature: 'ECLR'.
ICC Profile Color Space Type Signature: 'FCLR'.
ICC Profile Tag Signature: 'tech'.
ICC Profile Tag Signature: 'bfd '.
ICC Profile Tag Signature: 'vued'.
ICC Profile Tag Signature: 'view'.
ICC Profile Color Space Type Signature: 'XYZ '.
ICC Profile Color Space Type Signature: 'YCbr'.
ICC Profile Color Space Type Signature: 'Yxy '.
ICC Profile Constant: reserved.
ICC Profile Constant: tag type signaturE.
ICC Profile Constant: XYZNumber X.
Indicates whether some other object is "equal to" this one.
The equals
method implements an equivalence relation
on non-null object references:
- It is reflexive: for any non-null reference value
x
, x.equals(x)
should return
true
.
- It is symmetric: for any non-null reference values
x
and y
, x.equals(y)
should return true
if and only if
y.equals(x)
returns true
.
- It is transitive: for any non-null reference values
x
, y
, and z
, if
x.equals(y)
returns true
and
y.equals(z)
returns true
, then
x.equals(z)
should return true
.
- It is consistent: for any non-null reference values
x
and y
, multiple invocations of
x.equals(y) consistently return true
or consistently return false
, provided no
information used in equals
comparisons on the
objects is modified.
- For any non-null reference value
x
,
x.equals(null)
should return false
.
The equals method for class Object
implements
the most discriminating possible equivalence relation on objects;
that is, for any non-null reference values x
and
y
, this method returns true
if and only
if x
and y
refer to the same object
(x == y
has the value true
).
Note that it is generally necessary to override the hashCode
method whenever this method is overridden, so as to maintain the
general contract for the hashCode method, which states
that equal objects must have equal hash codes.
Returns the runtime class of an object. That Class
object is the object that is locked by static synchronized
methods of the represented class.
Returns the color space type. Returns one of the color space type
constants defined by the ColorSpace class. This is the
"input" color space of the profile. The type defines the
number of components of the color space and the interpretation,
e.g. TYPE_RGB identifies a color space with three components - red,
green, and blue. It does not define the particular color
characteristics of the space, e.g. the chromaticities of the
primaries.
Returns a byte array corresponding to the data of this ICC_Profile.
Returns a particular tagged data element from the profile as
a byte array. Elements are identified by signatures
as defined in the ICC specification. The signature
icSigHead can be used to get the header. This method is useful
for advanced applets or applications which need to access
profile data directly.
Constructs an ICC_Profile object corresponding to the data in
a byte array. Throws an IllegalArgumentException if the data
does not correspond to a valid ICC Profile.
Constructs an ICC_Profile corresponding to the data in an InputStream.
This method throws an IllegalArgumentException if the stream does not
contain valid ICC Profile data. It throws an IOException if an I/O
error occurs while reading the stream.
Constructs an ICC_Profile corresponding to one of the specific color
spaces defined by the ColorSpace class (for example CS_sRGB).
Throws an IllegalArgumentException if cspace is not one of the
defined color spaces.
Constructs an ICC_Profile corresponding to the data in a file.
fileName may be an absolute or a relative file specification.
Relative file names are looked for in several places: first, relative
to any directories specified by the java.iccprofile.path property;
second, relative to any directories specified by the java.class.path
property; finally, in a directory used to store profiles always
available, such as the profile for sRGB. Built-in profiles use .pf as
the file name extension for profiles, e.g. sRGB.pf.
This method throws an IOException if the specified file cannot be
opened or if an I/O error occurs while reading the file. It throws
an IllegalArgumentException if the file does not contain valid ICC
Profile data.
Returns profile major version.
Returns profile minor version.
Returns the number of color components in the "input" color
space of this profile. For example if the color space type
of this profile is TYPE_RGB, then this method will return 3.
Returns the color space type of the Profile Connection Space (PCS).
Returns one of the color space type constants defined by the
ColorSpace class. This is the "output" color space of the
profile. For an input, display, or output profile useful
for tagging colors or images, this will be either TYPE_XYZ or
TYPE_Lab and should be interpreted as the corresponding specific
color space defined in the ICC specification. For a device
link profile, this could be any of the color space type constants.
Returns the profile class.
Returns a hash code value for the object. This method is
supported for the benefit of hashtables such as those provided by
java.util.Hashtable
.
The general contract of hashCode
is:
- Whenever it is invoked on the same object more than once during
an execution of a Java application, the hashCode method
must consistently return the same integer, provided no information
used in equals comparisons on the object is modified.
This integer need not remain consistent from one execution of an
application to another execution of the same application.
- If two objects are equal according to the equals(Object)
method, then calling the
hashCode
method on each of
the two objects must produce the same integer result.
- It is not required that if two objects are unequal
according to the
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hashtables.
As much as is reasonably practical, the hashCode method defined by
class Object does return distinct integers for distinct
objects. (This is typically implemented by converting the internal
address of the object into an integer, but this implementation
technique is not required by the
JavaTM programming language.)
Wakes up a single thread that is waiting on this object's
monitor. If any threads are waiting on this object, one of them
is chosen to be awakened. The choice is arbitrary and occurs at
the discretion of the implementation. A thread waits on an object's
monitor by calling one of the
wait
methods.
The awakened thread will not be able to proceed until the current
thread relinquishes the lock on this object. The awakened thread will
compete in the usual manner with any other threads that might be
actively competing to synchronize on this object; for example, the
awakened thread enjoys no reliable privilege or disadvantage in being
the next thread to lock this object.
This method should only be called by a thread that is the owner
of this object's monitor. A thread becomes the owner of the
object's monitor in one of three ways:
- By executing a synchronized instance method of that object.
- By executing the body of a
synchronized
statement
that synchronizes on the object.
- For objects of type
Class,
by executing a
synchronized static method of that class.
Only one thread at a time can own an object's monitor.
Wakes up all threads that are waiting on this object's monitor. A
thread waits on an object's monitor by calling one of the
wait
methods.
The awakened threads will not be able to proceed until the current
thread relinquishes the lock on this object. The awakened threads
will compete in the usual manner with any other threads that might
be actively competing to synchronize on this object; for example,
the awakened threads enjoy no reliable privilege or disadvantage in
being the next thread to lock this object.
This method should only be called by a thread that is the owner
of this object's monitor. See the notify
method for a
description of the ways in which a thread can become the owner of
a monitor.
Sets a particular tagged data element in the profile from
a byte array. This method is useful
for advanced applets or applications which need to access
profile data directly.
Returns a string representation of the object. In general, the
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Causes current thread to wait until another thread invokes the
method or the
method for this object.
In other words, this method behaves exactly as if it simply
performs the call
wait(0).
The current thread must own this object's monitor. The thread
releases ownership of this monitor and waits until another thread
notifies threads waiting on this object's monitor to wake up
either through a call to the notify
method or the
notifyAll
method. The thread then waits until it can
re-obtain ownership of the monitor and resumes execution.
As in the one argument version, interrupts and spurious wakeups are
possible, and this method should always be used in a loop:
synchronized (obj) {
while (<condition does not hold>)
obj.wait();
... // Perform action appropriate to condition
}
This method should only be called by a thread that is the owner
of this object's monitor. See the
notify
method for a
description of the ways in which a thread can become the owner of
a monitor.
Causes current thread to wait until either another thread invokes the
method or the
method for this object, or a
specified amount of time has elapsed.
The current thread must own this object's monitor.
This method causes the current thread (call it T) to
place itself in the wait set for this object and then to relinquish
any and all synchronization claims on this object. Thread T
becomes disabled for thread scheduling purposes and lies dormant
until one of four things happens:
- Some other thread invokes the notify method for this
object and thread T happens to be arbitrarily chosen as
the thread to be awakened.
- Some other thread invokes the notifyAll method for this
object.
- Some other thread interrupts
thread T.
- The specified amount of real time has elapsed, more or less. If
timeout is zero, however, then real time is not taken into
consideration and the thread simply waits until notified.
The thread
T is then removed from the wait set for this
object and re-enabled for thread scheduling. It then competes in the
usual manner with other threads for the right to synchronize on the
object; once it has gained control of the object, all its
synchronization claims on the object are restored to the status quo
ante - that is, to the situation as of the time that the
wait
method was invoked. Thread
T then returns from the
invocation of the
wait method. Thus, on return from the
wait method, the synchronization state of the object and of
thread
T is exactly as it was when the
wait method
was invoked.
A thread can also wake up without being notified, interrupted, or
timing out, a so-called spurious wakeup. While this will rarely
occur in practice, applications must guard against it by testing for
the condition that should have caused the thread to be awakened, and
continuing to wait if the condition is not satisfied. In other words,
waits should always occur in loops, like this one:
synchronized (obj) {
while (<condition does not hold>)
obj.wait(timeout);
... // Perform action appropriate to condition
}
(For more information on this topic, see Section 3.2.3 in Doug Lea's
"Concurrent Programming in Java (Second Edition)" (Addison-Wesley,
2000), or Item 50 in Joshua Bloch's "Effective Java Programming
Language Guide" (Addison-Wesley, 2001).
If the current thread is
interrupted
by another thread
while it is waiting, then an InterruptedException is thrown.
This exception is not thrown until the lock status of this object has
been restored as described above.
Note that the wait method, as it places the current thread
into the wait set for this object, unlocks only this object; any
other objects on which the current thread may be synchronized remain
locked while the thread waits.
This method should only be called by a thread that is the owner
of this object's monitor. See the notify
method for a
description of the ways in which a thread can become the owner of
a monitor.
Causes current thread to wait until another thread invokes the
method or the
method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
This method is similar to the wait
method of one
argument, but it allows finer control over the amount of time to
wait for a notification before giving up. The amount of real time,
measured in nanoseconds, is given by:
1000000*timeout+nanos
In all other respects, this method does the same thing as the
method
of one argument. In particular,
wait(0, 0) means the same thing as wait(0).
The current thread must own this object's monitor. The thread
releases ownership of this monitor and waits until either of the
following two conditions has occurred:
- Another thread notifies threads waiting on this object's monitor
to wake up either through a call to the
notify
method
or the notifyAll
method.
- The timeout period, specified by
timeout
milliseconds plus nanos
nanoseconds arguments, has
elapsed.
The thread then waits until it can re-obtain ownership of the
monitor and resumes execution.
As in the one argument version, interrupts and spurious wakeups are
possible, and this method should always be used in a loop:
synchronized (obj) {
while (<condition does not hold>)
obj.wait(timeout, nanos);
... // Perform action appropriate to condition
}
This method should only be called by a thread that is the owner
of this object's monitor. See the
notify
method for a
description of the ways in which a thread can become the owner of
a monitor.
Write this ICC_Profile to an OutputStream.
Write this ICC_Profile to a file.