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

Home » Public Forums » archive » Re: Why does color change to b/w when using PNG?
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: Why does color change to b/w when using PNG? [message #38521 is a reply to message #38519] Wed, 17 March 2004 11:51 Go to previous messageGo to previous message
bleau is currently offline  bleau
Messages: 24
Registered: November 1993
Junior Member
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

In the PNG plot, the y-axis is way too short, the y-axis label runs the
wrong direction, the labelling near the top is scrunched together, and not
all of the data gets plotted (bottom plot missing).

Something is seriously different when using PNG vs. PS but using the exact
same plotting commands. Has anyone had experience with PNG?

As another test, I decided to write out a JPEG format as well. I just
added a call to WRITE_JPEG; see http://uleis.umd.edu/~bleau/ULEIS_2004_001_2004_005.JPG;1
This one, however, is completely black! It's like all color table entries
are 0s. The call to TVLCT is still there.

Could it be that TVLCT fails miserably with JPEG and PNG images, even
though it works with PS and GIF? If I can get the color table working with
the JPEG image I can then troubleshoot problems with the Z device vs.
problems with PNG per se.

So, I have two problems: major problem is poor plotting with PNG, minor
problem is how to get colors on a JPEG image (why TVLCT fails). TIA.

Lawrence Bleau
University of Maryland
Physics Dept., Space Physics Group
301-405-6223
bleau@umtof.umd.edu
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: dynamically change the layout of widget
Next Topic: Problem with pointers to structures

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

Current Time: Fri Oct 10 19:36:56 PDT 2025

Total time taken to generate the page: 1.22247 seconds