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

Home » Public Forums » archive » graphic formats
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: graphic formats [message #15463 is a reply to message #15408] Tue, 18 May 1999 00:00 Go to previous message
jmeloy is currently offline  jmeloy
Messages: 1
Registered: May 1999
Junior Member
In article <hXM_2.974$Qy3.452@news.flash.net>,
"Steve Carothers" <onav1@flash.net> wrote:
> Is there a way to output plots in an easily
portable format such as gif or
> jpg? Currently, I can only output plots using
the set_plot command, which
> gives output "formats" of postscript, Hewlett
Packard graphic language, and
> others that aren't easily portable. The next
best thing would be to find a
> cheap UNIX or PC program that can convert
postscript to gif without losing
> resolution. Any help would be much appreciated.
>
> Steve

Below is a short code segment that demonstrates
how to use the image_create and image_write
functions

COMMON Colors, r_orig, g_orig, b_orig,r_curr,
g_curr, b_curr

imgsz = 400
imgtype = 'gif' ; use
GIF,JPEG,MIFF,PCD,PCX,PNG,SUN,TGA,TIFF

DEVICE,pseudo_color=8
WINDOW, 0, /Free, Xsize = imgsz, Ysize = imgsz,
colors = 256
LOADCT, 5
cmap = [TRANSPOSE(r_curr), TRANSPOSE(g_curr),
TRANSPOSE(b_curr)]

tvscl, DIST(imgsz)
graphic = TVRD(0, 0, imgsz-1, imgsz-1)

iout = image_create(graphic, Colormap = cmap,
File_type = imgtype)
status = image_write('img.'+imgtype, iout,
/overwrite)

Hope this helps

Jeff
>



--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: divide by zero problems
Next Topic: Looking for Hough and/or Radon transform code

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

Current Time: Wed Dec 03 04:01:42 PST 2025

Total time taken to generate the page: 0.48387 seconds