comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: gamma correction
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: gamma correction [message #31246 is a reply to message #31245] Wed, 26 June 2002 14:17 Go to previous messageGo to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
Hi all,

"David Fanning" <wrote in message
news:MPG.1783bfeb1d50d36a989916@news.frii.com...
> Med Bennett (no.spam@this.address.please) writes:
>
>> Hmmm... my Irfanview software happily gamma corrects 24-bit JPEGs - I do it
all
>> the time. Why shouldn't IDL be able to do it?
>
> I'm not suggesting gamma correction is impossible.
> I just don't know what it means. What do you think it
> means for 24-bit images? In other words, what are you
> doing to the image when you gamma correct it?

Usually, colortables are used with 2D (nx, ny) images where the byte values are
looked up in the RGB colortables, while 3D images (3, nx, ny) have their byte
values used exactly as given.

Less common, but equally valid, is to display a 3D image where each plane's byte
values are looked up in the colortables. Gamma_CT changes the colortables so
that an image that uses them appears to have had its 'gamma' changed.

Quick examples:

=====

COMMON Colors ; allow access to color tables
Device, Decomposed=0 ; set to use color tables for lookup

file = FilePath('rose.jpg', SubDir=['examples', 'data'])
Read_JPEG, file, image

TV,/True,image ; show original image

Gamma_CT,0.5 ; set gamma 0.5
Plot,[r_curr,g_curr,b_curr] ; show the colortables (crudely!)
TV,/True,image ; show image

Gamma_CT,2.0 ; set gamma 2.0
Plot,[r_curr,g_curr,b_curr] ; show the colortables
TV,/True,image ; show image

END

=====

No need to recompute the image array, it just passes through the transforming
colortables on its way to the display. Hope this helps!

Cheers,
--
-Dick

Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Delvar?
Next Topic: Delvar?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 02:14:53 PDT 2025

Total time taken to generate the page: 2.32605 seconds