public class ICCConvert
extends java.lang.Object
Vona's utils: color space conversion command line tool.
This is a stand-alone command-line utility for converting a color value fromn one color space to another. Several distinguished color spaces are available:
Copyright (C) 2004 Marsette A. Vona, III
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
cvsid
CVS id.
|
(package private) static java.text.NumberFormat |
nf
The NumberFormat we use to display color component values.
|
static java.lang.String |
USAGE
Usage string.
|
Constructor and Description |
---|
ICCConvert() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] argv)
See
USAGE for semantics of argv . |
(package private) static java.awt.color.ColorSpace |
parseColorSpace(java.lang.String space)
Parse a color space identifier.
|
(package private) static java.lang.String |
printColor(java.awt.Color c,
float scale)
Print all components of a color in the ranges of its native color
space.
|
(package private) static java.lang.String |
printSpace(java.awt.color.ColorSpace s,
java.lang.String name)
prints the class and name of a color space
|
private static final java.lang.String cvsid
CVS id.
public static final java.lang.String USAGE
Usage string.
static java.text.NumberFormat nf
The NumberFormat we use to display color component values.
public static void main(java.lang.String[] argv)
See USAGE
for semantics of argv
.
static java.awt.color.ColorSpace parseColorSpace(java.lang.String space) throws java.io.IOException
Parse a color space identifier.
space
- either one of the distinguished space names listed in the
class header doc (compared case insensitive) or the pathname of an ICC
filejava.io.IOException
- if name
is supposed to be an .icc file
but there was a problem loading itstatic java.lang.String printColor(java.awt.Color c, float scale)
Print all components of a color in the ranges of its native color space.
c
- the Color to printscale
- an extra scale factor applied to all componentsstatic java.lang.String printSpace(java.awt.color.ColorSpace s, java.lang.String name)