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

Home » Public Forums » archive » Re: gif from true color image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: gif from true color image [message #28822] Wed, 16 January 2002 05:26 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Klaus Scipal (kscipal@ipf.tuwien.ac.at) writes:

> I am displaying some images on a true color device. My problem is when I
> want to save these images as gifs, some colors get "distorted" (i.e white
> becomes gray etc). I know the reason, transforming the image from true color
> to 256 colors.
>
> So is there a way to preserve colors, i.e the gif image looks like the true
> color image on my device (I know I can change the settings of my computer to
> 256 colors but this is annoying).

Here is an article that describes the problem and how to
attempt to correct it:

http://www.dfanning.com/color_tips/gif_gray.html

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: gif from true color image [message #28825 is a reply to message #28822] Wed, 16 January 2002 03:51 Go to previous messageGo to next message
Martin Downing is currently offline  Martin Downing
Messages: 136
Registered: September 1998
Senior Member
"Klaus Scipal" <kscipal@ipf.tuwien.ac.at> wrote in message
news:a23kpo$kil$1@news.tuwien.ac.at...
> Hi
>
> I hope this turns out to be a simple question
>
> I am displaying some images on a true color device. My problem is when I
> want to save these images as gifs, some colors get "distorted" (i.e white
> becomes gray etc). I know the reason, transforming the image from true
color
> to 256 colors.
>
> So is there a way to preserve colors, i.e the gif image looks like the
true
> color image on my device (I know I can change the settings of my computer
to
> 256 colors but this is annoying).
>
> Klaus
>
Well seeing as gifs only supported 8bit images and anyway are no longer
supported by IDL after 5.3, I'd take the advice in the manual and switch to
using PNG which will save 24 bit true color images.

cheers

Martin


Quoting from IDL5.4 help: "GIF SUPPORT"
Research Systems is no longer able to support reading and writing GIF
(Graphics Interchange Format) images or LZW (Lempel-Zif-Welch) compression
for TIFF images. The LZW technology has been patented by the Unisys
Corporation. Note that any users of GIF/LZW technology are required to enter
into a license agreement with Unisys Corporation.
The following are the related changes to IDL:

� READ_GIF, WRITE_GIF, and QUERY_GIF � These routines no longer are able to
read, write, and query GIF files. If you use these routines in any IDL
application, when executing, IDL will produce an error message and execution
will halt.

As an alternative to GIF, you can use the Portable Network Graphics (PNG)
format. This allows you to easily search and replace many of your calls to
READ_GIF, WRITE_GIF, and QUERY_GIF with READ_PNG, WRITE_PNG, and QUERY_PNG.
If you are currently using any GIF files in your IDL applications, you will
need to convert them to PNG.
The PNG format is a new standard intended to replace GIF as a dominant
network format. PNG handles 8-bit and 24-bit images and uses a lossless
compression scheme to compress images. For more information, see READ_PNG,
WRITE_PNG, and QUERY_PNG.
Re: gif from true color image [message #28918 is a reply to message #28822] Wed, 16 January 2002 07:01 Go to previous message
Klaus Scipal is currently offline  Klaus Scipal
Messages: 45
Registered: November 1997
Member
T'x David that is exactly what I was looking for

Klaus



David Fanning <david@dfanning.com> wrote in message
news:MPG.16af2d754f8db7729897d4@news.frii.com...
> Klaus Scipal (kscipal@ipf.tuwien.ac.at) writes:
>
>> I am displaying some images on a true color device. My problem is when I
>> want to save these images as gifs, some colors get "distorted" (i.e
white
>> becomes gray etc). I know the reason, transforming the image from true
color
>> to 256 colors.
>>
>> So is there a way to preserve colors, i.e the gif image looks like the
true
>> color image on my device (I know I can change the settings of my
computer to
>> 256 colors but this is annoying).
>
> Here is an article that describes the problem and how to
> attempt to correct it:
>
> http://www.dfanning.com/color_tips/gif_gray.html
>
> Cheers,
>
> David
>
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Large TIFF file question
Next Topic: FFT on a huge array

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

Current Time: Wed Oct 08 11:35:37 PDT 2025

Total time taken to generate the page: 0.00522 seconds