Skip to main content

color management with jai?

10 replies [Last post]
jroar
Offline
Joined: 2005-03-01
Points: 0

Hello,
I need to have decent color management in my application so I tried to load my image with JAI but the result is not really satisfactory. check out this image:
http://roar.roar-software.net/pics/farben.jpg
the picture on the left is loaded with photoshop and looks as it should be.
the one in the middle is loaded with JAI and on the right with standard javax.imageio classes. The JAI image looks better than the one on the right but is still not perfect.
Does anyone have an idea how to achieve the same result that photoshop does? (if I write the image with iText into a pdf it works too, by the way)
thanks a lot

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bpb
Offline
Joined: 2004-06-23
Points: 0

> > another thing I notices is when I turn on proof
> colors (Windows RGB or Monitor RGB
> > setup) in photoshop the image looks the same as
> when I load it with JAI (i.e. darker
> > colors)
>
> I'm not a Photoshop expert but it seems that JAI uses
> the given ICCProfile to read the
> image and photoshop only uses the profile for display
> if this option is chosen. As far as
> I know imageio can be forced to use default RGB color
> model. Maybe this would have a
> result near to Photoshop default color profile.

The ICC profile is only attached to the ColorModel for when it is needed by a display process or color conversation or something like that. JAI or JAI Image I/O does not otherwise do anything with it at all: it's just there to describe how the raw pixels would be interpreted as colors.

Brian

bpb
Offline
Joined: 2004-06-23
Points: 0

A JPEG file with TIFF metadata in it is likely an EXIF file acquired by a digital camera.

Brian

> I'm not a graphics expert so I can only tell what
> photoshop tells me:
> it's a jpeg file but apparently there is TIFF
> metadata stored in the file.
> in another namespace there are the following
> properties:
> photoshop:ColorMode: 3
> photoshop:ICCProfile: ECI-RGB.icc
> another thing I notices is when I turn on proof
> colors (Windows RGB or Monitor RGB setup) in
> photoshop the image looks the same as when I load it
> with JAI (i.e. darker colors)
> thanks in advance

marcojacob
Offline
Joined: 2006-07-10
Points: 0

Can you provide some more information about what you do to get this images?
Maybe there is a TIFF with included color profile and the handling is not correct
in imageio or you do scale and Photoshop does with different success.

jroar
Offline
Joined: 2005-03-01
Points: 0

I'm not a graphics expert so I can only tell what photoshop tells me:
it's a jpeg file but apparently there is TIFF metadata stored in the file.
in another namespace there are the following properties:
photoshop:ColorMode: 3
photoshop:ICCProfile: ECI-RGB.icc
another thing I notices is when I turn on proof colors (Windows RGB or Monitor RGB setup) in photoshop the image looks the same as when I load it with JAI (i.e. darker colors)
thanks in advance

marcojacob
Offline
Joined: 2006-07-10
Points: 0

> another thing I notices is when I turn on proof colors (Windows RGB or Monitor RGB
> setup) in photoshop the image looks the same as when I load it with JAI (i.e. darker
> colors)

I'm not a Photoshop expert but it seems that JAI uses the given ICCProfile to read the
image and photoshop only uses the profile for display if this option is chosen. As far as
I know imageio can be forced to use default RGB color model. Maybe this would have a
result near to Photoshop default color profile.

jroar
Offline
Joined: 2005-03-01
Points: 0

do you have a snippet of code on how to do that?
thanks

强 王

Hello guys,

I need the jai_imageio specification(HTML format). I tried a whole night, but I cound just find a part of it, only includes:

com.sun.media.imageio.plugins.bmp
com.sun.media.imageio.plugins.jpeg2000
com.sun.media.imageio.plugins.pnm
com.sun.media.imageio.plugins.tiff
com.sun.media.imageio.stream
com.sun.media.jai.operator

But I need more docs, for example:
com.sun.media.imageioimpl.common
com.sun.media.imageioimpl.plugins.bmp
com.sun.media.imageioimpl.plugins.jpeg
com.sun.media.imageioimpl.plugins.gif
...............
And does anyone know where to download the jj2000 specification(HTML docs)

I appreciate if you give me a link to download the specifications.

Thanks.
Dennis

---------------------------------
雅虎邮箱,您的终生邮箱!
[att1.html]

bpb
Offline
Joined: 2004-06-23
Points: 0

If you don't see something in the published javadoc that means that it is not a public API and you should not be using it. If you do so it is at your own risk as non-API level classes and interfaces may change at any time with no guarantee of backward compatibility.

Brian

> Hello guys,
>
> need the jai_imageio specification(HTML format). I
> tried a whole night, but I cound just find a part of
> it, only includes:
>
> com.sun.media.imageio.plugins.bmp
> com.sun.media.imageio.plugins.jpeg2000
> com.sun.media.imageio.plugins.pnm
> com.sun.media.imageio.plugins.tiff
> com.sun.media.imageio.stream
> com.sun.media.jai.operator
>
> ut I need more docs, for example:
> com.sun.media.imageioimpl.common
> com.sun.media.imageioimpl.plugins.bmp
> com.sun.media.imageioimpl.plugins.jpeg
> com.sun.media.imageioimpl.plugins.gif
> ...............
> And does anyone know where to download the jj2000
> specification(HTML docs)
>
> appreciate if you give me a link to download the
> specifications.
>
> Thanks.
> Dennis
>
> ---------------------------
> 雅虎邮箱,您的终生邮箱!
> att1.html]

强 王

Hello guys,

I need the jai_imageio specification(HTML format). I tried a whole night, but I cound just find a part of it, only includes:

com.sun.media.imageio.plugins.bmp
com.sun.media.imageio.plugins.jpeg2000
com.sun.media.imageio.plugins.pnm
com.sun.media.imageio.plugins.tiff
com.sun.media.imageio.stream
com.sun.media.jai.operator

But I need more docs, for example:
com.sun.media.imageioimpl.common
com.sun.media.imageioimpl.plugins.bmp
com.sun.media.imageioimpl.plugins.jpeg
com.sun.media.imageioimpl.plugins.gif
...............
And does anyone know where to download the jj2000 specification(HTML docs)

I appreciate if you give me a link to download the specifications.

Thanks.
Dennis

---------------------------------
雅虎邮箱,您的终生邮箱!
[att1.html]

marcojacob
Offline
Joined: 2006-07-10
Points: 0

Sorry but this is the jai_imageio javadoc. Maybe you think of imageio itself
which is part of the JDK, so look for the javax.imageio package in Java SE
since 1.4.x.