RE IMAGEJ Batch mode: Animation Options speed

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

RE IMAGEJ Batch mode: Animation Options speed

Toby Starborg
Dear Michael (et al),

     Thanks for the quick reply.  I am using the 'file>save as> gif' option in my macro.

The following code demonstrates the effect (though you'll need to change the output path).

First the one that works:
run("MRI Stack (528K)");
run("Animation Options...", "speed=100");
saveAs("Gif", "/Users/pricestarborg/Desktop/mri-stack.gif");  //change this path to something sensible
Then set batchmode and change the speed:
run("MRI Stack (528K)");
run("Animation Options...", "speed=1");
saveAs("Gif", "/Users/pricestarborg/Desktop/mri-stack.gif");  //change this path to something sensible

The speed will still be 100 when you view the gif after the second round as having batchmode active stops the speed  from being altered.

I hope that this allows you to test the effect.  I see this on my Mac and Linux box.. The Mac is running
version 2.0.0-rc-65/1.51s, build:961c5f1b7f
I'm not too sure what version the Linux box is running (away from it at the moment), but it should be equally new.

I've suddenly thought that I'm actually running Fiji (  I don't know how this will affect the animation options .

Thanks again for your help with this.  I'm happy to supply any further information if you are unable to reproduce the issue.

Toby S

Date:    Mon, 12 Feb 2018 14:34:34 +0000
From:    Toby Starborg <[hidden email]>
Subject: Batch mode: Animation Options speed

Dear ImageJ users,  I'm hoping that you can help me with a small problem
that Ii have.  I have written a rather crude macro to generate little
animated gifs for all my folders containing dm4 images.  The macro works
quite well, but in batch mode the animation speed is not set.

Specifically I use the option setBatchMode(true);   at the start of the
macro and the command that now doesn't work is:

run("Animation Options...", "speed="+speed);

where 'speed' is calculated as 5/number_of_frames (this is number is
input into the function).

When I test it without batchmode it works fine, but with batchmode on
all of the animation speeds default to the last defined speed.

I was wondering if this is meant to happen, or if I have missed an
option that would help me.

Thanks in advance.


Dr Tobias Starborg
Senior Experimental Officer: 3DEM
Wellcome Centre for Cell Matrix Research
Michael Smith Building
M13 9PT
Tel: +44(0)1612755170

ImageJ mailing list:


Date:    Mon, 12 Feb 2018 18:22:23 +0100
From:    Michael Schmid <[hidden email]>
Subject: Re: Batch mode: Animation Options speed

Hi Toby,

Which animated gif export do you use?
The external plugin of ImageJ1 or the built-in File>Save As>Animated GIF
of ImageJ2/Fiji?

It might be also helpful to have a simple test macro that shows the
problem (e.g. using one of the stacks from the Open Samples menu), in
the spirit of a "Minimal, Complete and Verifiable Example".


ImageJ mailing list: