Color of jpeg image

O

oetting

Hi

I have made a small applet that resizes images and posts them to a
webserver. I am using the JIMI api, i find this simple and versitile.

But when i resize a bright and nice image with the color model Adobe
RGB the colors get dull. When i look at the resized image the
colormodel is generic rgb. If i change this to sRGB using the "preview"
application on my mac, the colors get nice again.
How do i change the colormodel of my generated images using java.
I have been looking at java.awt.color and som IIC stuff, but I dont
seem to understand it. I cant get it working
Can anyone help me?

Jacob Oettinger
 
O

Oliver Wong

Hi

I have made a small applet that resizes images and posts them to a
webserver. I am using the JIMI api, i find this simple and versitile.

But when i resize a bright and nice image with the color model Adobe
RGB the colors get dull. When i look at the resized image the
colormodel is generic rgb. If i change this to sRGB using the "preview"
application on my mac, the colors get nice again.
How do i change the colormodel of my generated images using java.
I have been looking at java.awt.color and som IIC stuff, but I dont
seem to understand it. I cant get it working
Can anyone help me?

I wouldn't know where to look in the Java API, but if you want to hack
your own solution, there's a conversion table for different RGB-based color
models located at: http://en.wikipedia.org/wiki/RGB_color_space

Just do a few matrix multiplications and you're set! =)

- Oliver
 
R

Roedy Green

If i change this to sRGB using the "preview"
application on my mac, the colors get nice again.

I suspect this might have something do with gamma correction which can
be looked at a species of contrast knob.

The problem is SOMEWHERE along the line you need to correct for the
non-linear behaviour of the monitor. It pretty easy to do the
correction twice or not at all. Perhaps eventually correction will be
a purely hardware function and all images and software will ignore the
problem. Until then, too many cooks...

For a generic intro to the problem see
http://mindprod.com/jgloss/gamma.html
 
O

oetting

Thank you both for your answers. I have looked at your suggestions but
have so far not been able to solve my problem.

I will try asking in the jav forum at sun.

Thank you

/Jacob
 
R

Roedy Green

But when i resize a bright and nice image with the color model Adobe
RGB the colors get dull. When i look at the resized image the
colormodel is generic rgb. If i change this to sRGB using the "preview"
application on my mac, the colors get nice again.

to understand what is happening to you see
http://mindprod.com/gamma.html

There are times like this when I am amazed at human stupidity that
they can't solve this problem. It is not a technical problem. It is
about making a decision who is going to do the gamma correction and
how you mark that it has been done. It seems to me it should be done
in the device driver or the video hardware card or monitor. You need
to push it to the last minute since you don't know the characteristics
of the distortion ahead of time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top