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

Home » Public Forums » archive » Re: Animated GIF in IDL
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
Re: Animated GIF in IDL [message #31839] Wed, 21 August 2002 20:57
Dan Blair is currently offline  Dan Blair
Messages: 5
Registered: May 2001
Junior Member
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
This may be of some help.
<p><A HREF="http://www.physics.emory.edu/~weeks/lab/animated.html">http://www.physics.emory.edu/~weeks/lab/animated.html</A>
<p>Best of luck
<p>Dan
<br>&nbsp;
<p>Mark Hadfield wrote:
<blockquote TYPE=CITE>"RichardW" &lt;rmw092001@yahoo.com> wrote in message
<br><a href="news:9f4a7077.0208201922.4749ea3f@posting.google.com">news:9f4a7077.0208201922.4749ea3f@posting.google.com</a>...
<p>> Imagemagick ( www.imagemagick.org ) can make animated GIFs and it's
<br>> freeware, works on unix and windows. You could write bitmap files
<br>> using WRITE_BMP in IDL, then SPAWN a command to imagemagick,
<br>> converting them into an animated GIF.
<p>Yes, but in recent versions of Imagemagick, GIF compression has been
<br>disabled by default (for the same reasons as in IDL), so it produces
<br>uncompressed GIFs. To get GIF compression with a recent version of
IM,
<br>you will need to rebuild it appropriately.
<p>--
<br>Mark Hadfield&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
"Ka puwaha te tai nei, Hoea tatou"
<br>m.hadfield@niwa.co.nz
<br>National Institute for Water and Atmospheric Research (NIWA)</blockquote>

<pre>--&nbsp;
============================================================ ============
Daniel Blair&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp; Clark University&nbsp;
Nonlinear Dynamics Lab&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp; 508-793-7707
950 Main Street&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& ;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& ;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& ;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& ;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& ;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; blair@nls1.clarku.edu
Worcester, MA&nbsp; 01610-1477&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A HREF="http://nls1.clarku.edu/~blair">http://nls1.clarku.edu/~blair</A>
============================================================ ============ </pre>
&nbsp;</html>
Re: Animated GIF in IDL [message #31840 is a reply to message #31839] Wed, 21 August 2002 14:07 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"RichardW" <rmw092001@yahoo.com> wrote in message
news:9f4a7077.0208201922.4749ea3f@posting.google.com...

> Imagemagick ( www.imagemagick.org ) can make animated GIFs and it's
> freeware, works on unix and windows. You could write bitmap files
> using WRITE_BMP in IDL, then SPAWN a command to imagemagick,
> converting them into an animated GIF.

Yes, but in recent versions of Imagemagick, GIF compression has been
disabled by default (for the same reasons as in IDL), so it produces
uncompressed GIFs. To get GIF compression with a recent version of IM,
you will need to rebuild it appropriately.

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: Animated GIF in IDL [message #31860 is a reply to message #31840] Wed, 21 August 2002 00:52 Go to previous message
Timm Weitkamp is currently offline  Timm Weitkamp
Messages: 66
Registered: August 2002
Member
Kasia,

On 20.08.02 at 17:31 -0500, Craig Markwardt wrote:

> [...]
>
> The question is how do you make *any* GIFs in IDL? Older version of
> IDL are able to make GIFs, and animated GIFs are documented in
> WRITE_GIF.
>
> If you have some older versions of IDL lying around, then it may be
> possible to take the GIF dlm from the old version and copy it to your
> new version directory, and then be able to use it. The only way to
> find out is to try it.
>
> [...]

As Craig points out, in recent versions of IDL the GIF support is disabled
for patent reasons. But in case you do have the WRITE_GIF routine running
on your system, below you find a routine that gives you an easy interface
for writing animated GIFs from an image array stack. It just only calls
WRITE_GIF several times with the appropriate arguments to create an
animated GIF from the input image stack.

(Whether WRITE_GIF runs on your computer can be easily tested. Just type
at the IDL command line something like,

WRITE_GIF, 'test.gif', BINDGEN(16,16)

and see what happens.)

Now below's my old routine for writing animated GIFs. May it be useful...

Cheers,
Timm

;+
; NAME:
; WRITE_MULTIGIF
;
; PURPOSE:
; Write multiple images to a GIF file, creating a movie.
;
; CATEGORY:
; Image format conversion
;
; CALLING SEQUENCE:
; WRITE_MULTIGIF, <filename>, <3darr> [, r, g, b]
;
; INPUTS:
; filename A scalar string containing the full pathname
; of the GIF file to write
; 3darr A three-dimensional array of type BYTE.
; Dimensions are (x,y,n), where x and y are the
; pixel dimensions of the images and n the number of frames.
;
; OPTIONAL INPUTS:
; r,g,b Red, green, blue vectors (are passed to WRITE_GIF)
;
; KEYWORD PARAMETERS:
; VERBOSE Set this to get some text output during operation.
;
; MODIFICATION HISTORY:
; 27 Sep 1999 Written by Timm Weitkamp, ESRF
;-

PRO write_multigif, filename, array, r, g, b, VERBOSE=verbose

IF N_PARAMS() LT 2 THEN BEGIN
PRINT, '*** Usage: WRITE_MULTIGIF, filename, array [, r, g, b]'
PRINT, ' array is BYTARR(x,y,n)'
PRINT, ' r, g, b as in WRITE_GIF'
ENDIF

n=(SIZE(array))[3]

FOR i=1,n DO BEGIN
IF KEYWORD_SET(verbose) THEN $
PRINT, filename, i, n $
, FORMAT='("*** Multi-GIF ",A,": Writing frame",I4,"/",I4)'
IF N_ELEMENTS(r) GT 0 THEN $
WRITE_GIF, /MULTIPLE, filename, array[*,*,i-1], r, g, b $
ELSE $
WRITE_GIF, /MULTIPLE, filename, array[*,*,i-1]
ENDFOR
WRITE_GIF, filename, /CLOSE

END
Re: Animated GIF in IDL [message #31862 is a reply to message #31860] Tue, 20 August 2002 20:22 Go to previous message
rmw092001 is currently offline  rmw092001
Messages: 17
Registered: January 2002
Junior Member
Craig Markwardt <craigmnet@cow.physics.wisc.edu> wrote in message news:<onbs7x17s1.fsf@cow.physics.wisc.edu>...
> dunia77@yahoo.com (Kasia Mikurda) writes:
>
>>
>> does somebody know how to make an animated GIF in IDL ?
>> or maybe you have any suggestions about the freeware progs (Unix or
>> Windows) that can help me ?
>
> The question is how do you make *any* GIFs in IDL? Older version of
> IDL are able to make GIFs, and animated GIFs are documented in
> WRITE_GIF.
>
> If you have some older versions of IDL lying around, then it may be
> possible to take the GIF dlm from the old version and copy it to your
> new version directory, and then be able to use it. The only way to
> find out is to try it.
>
> If it is something you are willing to pay for, I believe that RSI
> offers a GIF licensing option.
>
> Good luck,
> Craig

Imagemagick ( www.imagemagick.org ) can make animated GIFs and it's
freeware, works on unix and windows. You could write bitmap files
using WRITE_BMP in IDL, then SPAWN a command to imagemagick,
converting them into an animated GIF.
Re: Animated GIF in IDL [message #31865 is a reply to message #31862] Tue, 20 August 2002 15:31 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
dunia77@yahoo.com (Kasia Mikurda) writes:

>
> does somebody know how to make an animated GIF in IDL ?
> or maybe you have any suggestions about the freeware progs (Unix or
> Windows) that can help me ?

The question is how do you make *any* GIFs in IDL? Older version of
IDL are able to make GIFs, and animated GIFs are documented in
WRITE_GIF.

If you have some older versions of IDL lying around, then it may be
possible to take the GIF dlm from the old version and copy it to your
new version directory, and then be able to use it. The only way to
find out is to try it.

If it is something you are willing to pay for, I believe that RSI
offers a GIF licensing option.

Good luck,
Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: From a novice in IDL
Next Topic: IDLdbDatabase - how to check the connected dataSource name?

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

Current Time: Wed Oct 08 15:47:05 PDT 2025

Total time taken to generate the page: 0.00844 seconds