Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Color of jpeg image

Reply
Thread Tools

Color of jpeg image

 
 
oetting@gmail.com
Guest
Posts: n/a
 
      09-29-2005
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

 
Reply With Quote
 
 
 
 
Oliver Wong
Guest
Posts: n/a
 
      09-29-2005

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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


 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      09-29-2005
On 29 Sep 2005 13:11:53 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote or quoted :

> 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

--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
oetting@gmail.com
Guest
Posts: n/a
 
      10-07-2005
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

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      10-08-2005
On 29 Sep 2005 13:11:53 -0700, (E-Mail Removed) wrote or quoted :

>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.



--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
Jpeg encoder exception: Trying to make a thumbail from a jpeg image in a byte[] lovaspillando Java 0 08-25-2007 11:21 PM
Nikon D70 RAW converted to JPEG - jpeg file size 3MB ? 5 MB? Amit Digital Photography 3 03-17-2006 10:40 AM
Exiff-jpeg and jpeg certsnsearches Digital Photography 2 01-07-2004 08:13 PM
huge jpeg files show as very small thumbnails (canon 300d, JPEG) kl Digital Photography 6 11-12-2003 08:11 PM



Advertisments