Hi everyone, I am trying to save all opened images with their original names. I am using a macro code:
// get image IDs of all open images
dir = getDirectory("Choose a Directory");
ids=newArray(nImages);
for (i=0;i<nImages;i++) {
selectImage(i+1);
title = getTitle;
print(title);
ids[i]=getImageID;
saveAs("tiff", dir+title);
}
It worked pretty well several months before, but somehow this time all images were saved as empty file (the size is 0, and not in tiff format). Is there something wrong with the language that I selected (I tried Java, IJ1macro and Beanshell, none worked). Can anyone nicely help me or give a clue? Many many thanks.