Saving image stack as sequence using macro: Output has not been set

I’ve been using the macro recorder to learn how to save an image sequence.

The recorder records something like this:

run("Image Sequence... ", "format=JPEG save=[/home/username/Desktop/folder/img0000.jpeg]");

However, when I replay the macro, I’m getting an error message:
"java.lang.IllegalStateException: Output has not been set!"

Ultimately I’d like it to save the images to a different folder like this:

run("Image Sequence... ", "format=JPEG save=[/home/username/Desktop/" + basefolder_out + "/" + channel + "/img" + channel + "0000.jpeg]");

where basefolder_out and channel are string variables.

Anyone knows why did the macro recorder fail to play back and how to fix this error?

Thanks!

Hi @matohak, welcome to the forum.

I can confirm the issue can be replicated. For me, replacing the file extension .jpeg with .jpg solves the problem and writes out the files as expected. eg.

run("Image Sequence... ", "format=JPEG save=[/home/username/Desktop/" + basefolder_out + "/" + channel + "/img" + channel + "0000.jpg]");

Can you check if that works for you?

1 Like