Why not removing/deleting the background before exporting?
If it to resize and center a millions image's canvas, XnConvert is your friend and will go way faster than GIMP IMHO, drop your folders in XnConvert, setup your filters, output directories, and so... for an old slow computer like mine, it does > 5-600 images conversion per minute depending size, filters added... and so
I don't know if one will do the change in your python plugin, but you can do the removal of all the background via your operating system terminal as you are dealing with directories (folders). It will be done in less than a second by your OS.
Depending your directories set-up/trees and if name you give to the "background.jpg" is the same across all your directories (or has the same naming pattern).
On Linux I would go in the root directory of your saved work via terminal then run in the terminal something like this (That's just an example, and most important, I would some test on a dummy directory with sub-directories to be sure or fine tune it)
which basically will delete recursively all files named "background.jpg" in the directory you are in, as well as in all sub-directories.
For windows, I have no idea what the code will be, just wait, there are windows users here as well, or maybe some one will add the removal background line to your code.
If it to resize and center a millions image's canvas, XnConvert is your friend and will go way faster than GIMP IMHO, drop your folders in XnConvert, setup your filters, output directories, and so... for an old slow computer like mine, it does > 5-600 images conversion per minute depending size, filters added... and so
(03-22-2022, 09:18 PM)Fizzgig Wrote: They will then go to every individual folder (sometimes a couple hundred) and delete the white background image.
I don't know if one will do the change in your python plugin, but you can do the removal of all the background via your operating system terminal as you are dealing with directories (folders). It will be done in less than a second by your OS.
Depending your directories set-up/trees and if name you give to the "background.jpg" is the same across all your directories (or has the same naming pattern).
On Linux I would go in the root directory of your saved work via terminal then run in the terminal something like this (That's just an example, and most important, I would some test on a dummy directory with sub-directories to be sure or fine tune it)
Code:
find . -name "background.jpg" -type f -delete
which basically will delete recursively all files named "background.jpg" in the directory you are in, as well as in all sub-directories.
For windows, I have no idea what the code will be, just wait, there are windows users here as well, or maybe some one will add the removal background line to your code.