Re: Why does color change to b/w when using PNG? [message #38519] |
Wed, 17 March 2004 12:15  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Lawrence Bleau wrote:
> In article <c6d70400.0403161901.71f0d9b8@posting.google.com>, andrew.cool@dsto.defence.gov.au (Andrew Cool) writes:
>
>> bleau@UMTOF.UMD.EDU (Lawrence Bleau) wrote in message news:<c380s1$3hb$1@grapevine.wam.umd.edu>...
>>
>>> I'm running IDL 5.4 on OpenVMS 7.1-2 and am trying to do some plots.
>>>
>>> Previously, we were using the ps device (SET_PLOT,'PS') and generating
>>> PostScript files for each plot. We now want to generate PNG files as well.
>
> [snip]
>
>>> So, what's different between these two plot types (PS vs. PNG) that would
>>> cause the same code to produce different results? TIA.
>>
>> Wouldn't WRITE_PNG do the job for you?? Along with the R,G,B parameters.
>
>
> Thanks for the tip, Andrew. I specified the r,g,b arguments and it wrote
> out the color table as well as the image. Now I have a color image.
> That's the good news. Now for the bad.
>
> The plot looks absolutely horrible! This is by comparison with the PS plot
> made earlier. Something is seriously wrong here. To see what I mean, take
> a look at
>
> http://uleis.umd.edu/~bleau/ULEIS_2004_001_2004_005.PNG;4
>
> It should look something like
>
> http://uleis.umd.edu/docs/desai/GIFS/ULEIS_2004_001_2004_005 .GIF
>
Hello,
This probably won't solve your problem since you're running on an OpenVMS system, but I
have *never* found any way to make anything but PS output in IDL look good. To get around
this, I always create PS files and then, using the ImageMagick utilities that come bundled
with Red Hat linux, simply convert it to a gif file,
convert idl.ps idl.gif
The gif output is way better than direct png/gif/jpeg writes. And you don't have to output
gifs. Convert supports a crapload of file types.
I don't have plots anywhere near as fancy as yours, but you can see some examples at:
http://airs3.ssec.wisc.edu/~paulv/Fortran90/Emissivity/Senso r_Emissivity_Model/
Depending on what I'm doing, I either create the gif's by hand or invoke "convert" via
SPAWN in my IDL code.
On a whim, I went to the imagemagick site, http://www.imagemagick.org, and clicking on
"downloads" I saw a link to installation instructions for VMS:
http://www.imagemagick.org/www/Install-vms.html
paulv
p.s. This won't work if you want to do the surface overlay thingo detailed at
http://www.sljus.lu.se/stm/IDL/Surf_Tips/ though.
|
|
|