Wallace wrote:
If all the images were opened at once using "Open as layers" dialog. The saved images should be saved to the folder that the images came from.
When images are opened as layers, GIMP does not make any record of where the source file is located. It is not possible (to my knowledge) for a script to ensure that layers are saved back to the directory whence they came.
Wallace wrote:
The images saved using "sg-save-all-layers" will not overwrite the original images, even if the original images were of the same type of file extension .eg, png, jpg, gif or whatever.
Files
will be overwritten if they happen to be in the same directory and have the same name as the corresponding files. However, per my previous comment this will only be the case if the user intervenes or the files happen to be taken from/saved to GIMP's default output directory. (GIMP's output directory is typically specified with the shortcut's "RUN IN FOLDER" property.)
Wallace wrote:
Saulgoode has stated, "you should be able to specify the directory". This does not occur. Once the "Export layes as separate png" is pressed/clicked, there is no dialog. It saves the images instantly without any input as to where the images will be saved.
My script,
as provided here, does not behave the way you describe. Perhaps you speak of a different script?
Carlos, I would be happy to customize the behavior of the script to your needs*, if you'd like.
* to the best of my abilities, anyway.
The script I'm using was last modified/tested by Paul Sherman; 02/03/2014 on GIMP-2.8.10 and shows up at File>Export layers as separate png.
This script saves files to where they came from and adds .png to the end of the file's name, so the new saved file name would look something like this, "ImageX.png.png" and so the files are not overwritten.
Sorry for the confusion on my part.