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 #15462 is a reply to message #15408] Tue, 18 May 1999 00:00 Go to previous messageGo to previous message
Jeff Meloy is currently offline  Jeff Meloy
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
>

Here's a quick example showing how to use the image_create and
image_write functions to do what you need.

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

;Image types supported
;BMP,GIF,JPEG,MIFF,PCD,PCX,PNG,SUN,TGA,TIFF
imgtyp = 'gif'
imgsz = 400

;display image
DEVICE, pseudo_color = 8
WINDOW, 0, colors = 256, xsize=imgsz, ysize=imgsz
LOADCT, 5
TV,DIST(imgsz)

;write output
graphic = TVRD(0, 0, imgsz-1, imgsz-1)
cmap = [TRANSPOSE(r_curr), TRANSPOSE(g_curr), TRANSPOSE(b_curr)]
iout = IMAGE_CREATE(graphic, Colormap = cmap, File_type = imgtyp)
status = IMAGE_WRITE('test.'+imgtyp, iout, /overwrite)

--
Jeff Meloy


--== 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: Sat Oct 18 04:46:45 PDT 2025

Total time taken to generate the page: 2.00020 seconds