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

Home » Public Forums » archive » converting a gif file to a postscipt file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
converting a gif file to a postscipt file [message #7429] Tue, 12 November 1996 00:00 Go to next message
Tim Duman is currently offline  Tim Duman
Messages: 2
Registered: June 1996
Junior Member
I am trying to read in a gif file and write it out to a postscript file.
The reason being is that your color printer only prints postscript.

The program I am using is at the end of the posting. The problems is
when I right it out to the postscript file there is no color in the
file. Can anybody help with this problem

Thank,
Tim Duman


pro giftops, FILENAME=filename

;
; This program converts a gif image file to a postscript file.
;
; Created: Tim Duman, 11/12/96, University of Kansas
;
;

IF NOT KEYWORD_SET(filename) THEN READ,'Input name of file: ',filename

READ_GIF, filename, image, red, green, blue
SET_PLOT,'z'
TVLCT, red, green, blue
TV,image
newimage = TVRD()


strname = STR_SEP(filename,'.')

SET_PLOT,'ps'
DEVICE,FILENAME=strname(0)+'.ps',/COLOR,BITS=8
TVLCT,red,green,blue
TV,newimage
DEVICE,/CLOSE

END ; End program giftops.pro
Re: converting a gif file to a postscipt file [message #7485 is a reply to message #7429] Fri, 15 November 1996 00:00 Go to previous message
Andy Loughe is currently offline  Andy Loughe
Messages: 174
Registered: November 1995
Senior Member
> pro giftops, FILENAME=filename
>
> IF NOT KEYWORD_SET(filename) THEN READ,'Input name of file: ',filename
>
> READ_GIF, filename, image, red, green, blue
> strname = STR_SEP(filename,'.')
> thisDevice = !D.NAME
> SET_PLOT,'ps'
> DEVICE,FILENAME=strname(0)+'.ps',/COLOR,BITS=8
> TVLCT,red,green,blue
> TV,newimage
> DEVICE,/CLOSE
> SET_PLOT, thisDevice
> END ; End program giftops.pro


A few refinements...

; This may be more generally acceptable (i.e., what if
filename='date.time.gif')
strname = strmid( filename, 0, strpos(filename, '.gif') )

Are you TV'ing image, or newimage?

--
Andrew F. Loughe afl@cdc.noaa.gov
University of Colorado, CIRES http://cdc.noaa.gov/~afl
Campus Box 449 phn:(303)492-0707 fax:(303)497-7013
Boulder, CO 80309-0449 "He who laughs last thinks slowest!"
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Writing mpeg from IDL (pseudo_to_true included)
Next Topic: IDL progs for looking at CZCS HDF files?

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

Current Time: Wed Oct 08 17:19:31 PDT 2025

Total time taken to generate the page: 0.00566 seconds