[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IDL 5.4 and gifs
"Richard G. French" <rfrench@wellesley.edu> wrote:
> Here is the authoritative answer from the IDL Product Manager at RSINC.
> (It appears to me that the best short-term solution is for some clever
> soul with time on their hands to come up with an interface to the
> library of GIF routines in http://www.imagemagick.org/
> but that is more than I can tackle at the moment.) - Dick
Or you can do it to the old routines in ghostscript. They don't
currently support GIF due to the copyright issue, but they do
specifically say that you can download the old GIF routines and they
work with the current ghostscript.
Then, just print a .ps file, and use the IDL commands below (which are
easily put into a procedure). I show it for PNG because I don't have the
GIF libraries installed so I can't figure out the device name, but the
device name is easy to figure out...just launch ghostscript with "-h" It
will list all the devices.
;;-------------- for UNIX... easily modified for windows
;;-------------- probably have to write an applescript on the mac
device = 'png16m'
res = 150
outFile = 'outfile.png'
inputFile = 'file.ps'
str = 'gs -sDEVICE='+device+' -dBATCH -dNOPAUSE -q -r'+ $
strtrim(fix(res),2)+' -sOutputFile='+outFile + $
' ' + inputFile
spawn, str
print, 'File written.'
;;--------------
The nice thing I've found about using ghostscript is that it gives very
consistent results across many different file formats. IDL is not that
consistent, thus David's claim to fame that he can make it consistent.
But this allows you to create plots at any resolution by changing the
res parameter without having to change any major system variables and
without having to regenerate your plot.
Todd