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

Home » Public Forums » archive » Re: How-to? color 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: How-to? color png [message #27661 is a reply to message #27659] Mon, 29 October 2001 13:45 Go to previous messageGo to previous message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
"Bernard K." wrote:
>
> Hello,
> I would like to ouput the result of a shade_surf graphic to a png file.
> Here is what I tried.
>
> 1)window, 1, xsize=600, ysize=400
> 2)data=findgen(600,400)
> 3) DEVICE, RETAIN=2, DECOMPOSED=0
> 4) xloadct to choose the color table BLUE/WHITE;
> 5) shade_surf, spec2d
> 6) data=tvrd()
> 7) write_png, 'image.png', data
>
> Although the screen output is displayed in color with the BLUE/WHITE
> table, the file 'image.png' only contains the axis but no colored
> surface.
>
> Does anybody know what I am doing wrong?
>
> Thanks for any answer,
>
> Bernard.
>
> ps: I am using IDL 5.5 on a Macintosh (OS X 10.1 in classic mode).


Hi,

You probably need to insert :-

6a) TVLCT,r,g,b,/GET ; get the current colour tables

and then change 7 to be :-

7) write_png, 'image.png', data, r,g,b ; write out colour tables too!


Andrew

------------------------------------------------------------ ---------
Andrew D. Cool .->-.
Electromagnetics & Propagation Group `-<-'
Surveillance Systems Division Transmitted on
Defence Science & Technology Organisation 100% recycled
PO Box 1500, Edinburgh electrons
South Australia 5108

Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@dsto.defence.gov.au
------------------------------------------------------------ ---------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Resolution
Next Topic: Re: IDL .SAV cross-platform problem

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

Current Time: Thu Oct 09 20:32:48 PDT 2025

Total time taken to generate the page: 0.71863 seconds