Export all opened images in GIMP at once - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +--- Thread: Export all opened images in GIMP at once (/Thread-Export-all-opened-images-in-GIMP-at-once) |
Export all opened images in GIMP at once - PixLab - 12-06-2023 Inspired by Rich2005 over-there > https://www.gimp-forum.net/Thread-Tip-to-Save-ALL-open-files-at-once which he literally wrote the WebP part Use case: You got a bunch of images in GIMP and you have finished to work on them, and want to export all at once in JPG or WebP or PNG, or TIFF or even BMP Or another use case: You did slice your image using guides with Image > Slice Using Guides with a grid of 10x10 and you got 100 opened images, go to export them one by one... You will want this with all those images opened (un-zip, then put the .scm file in the scripts folder) [attachment=10753] Now you just go to File > Export All Images As... Chose your folder, Chose the type of image, Give a generic name, and a start number (auto-numbering) [attachment=10752] What changed with the original ? A lot, like A LOT. Export the full image and not just a layer. Once you chose where to save and the file type, you can get a coffee or a beer, the script will care for the other million opened images and no question asked by GIMP. No default settings from GIMP, as before the exported JPG was bigger than the original, Thus now you can set your settings in the code, I did comment ALL for > JPG, WebP, PNG and TIF [attachment=10754] RE: Export all opened images in GIMP at once - Ofnuts - 12-06-2023 (12-06-2023, 02:34 PM)PixLab Wrote: Inspired by Rich2005 over-there > https://www.gimp-forum.net/Thread-Tip-to-Save-ALL-open-files-at-once which he literally wrote the WebP part With a little effort, you can pop up the save dialog parameters only once for the first image, and reuse the settings for the other images, and avoid to edit the script (and by the way, if you edit the script while Gimp is running, you have to refresh the scripts to get Gimp to use the new version). RE: Export all opened images in GIMP at once - PixLab - 12-06-2023 (12-06-2023, 05:13 PM)Ofnuts Wrote: With a little effort, you can pop up the save dialog parameters only once for the first image, and reuse the settings for the other images, and avoid to edit the script Indeed that would be very nice, and I thought about it as I think it's the right way especially for the user, but it's beyond my actual abilities with Scheme, for example yesterday I did struggle to understand that I did not need to declare multiple conditions (cond ...) for the script to work properly I tried with RUN-WITH-LAST-VALS but it does not open a dialog it does it like RUN-NONINTERACTIVE, and when I try a combination of RUN-INTERACTIVE and RUN-WITH-LAST-VALS, I got errors, my "knowledge" (if I can say that) is very-very limited. (maybe I need to make a list of RUN-INTERACTIVE / RUN-WITH-LAST-VALS and grab the one with "(car" or "(cdr" but i need to learn more about those) The thing is that it's quite hard to find help/resources or just some references about GIMP Scheme on the internet. (12-06-2023, 05:13 PM)Ofnuts Wrote: (and by the way, if you edit the script while Gimp is running, you have to refresh the scripts to get Gimp to use the new version). Yes indeed, between the Calendar last time and yesterday with this script I'm seriously thinking to add a shortcut to the Refresh Scripts, I cannot count how many time yesterday I did refresh, that was exhausting RE: Export all opened images in GIMP at once - Ofnuts - 12-07-2023 (12-06-2023, 10:21 PM)PixLab Wrote:(12-06-2023, 05:13 PM)Ofnuts Wrote: With a little effort, you can pop up the save dialog parameters only once for the first image, and reuse the settings for the other images, and avoid to edit the script The trick is to use RUN_INTERACTIVE on the first iteration and RUN_WITH_LAST_VALS on the next. There are some gotchas, because the varoius file plugins don't react all the same way with these values, some save the layer and other save the whole image so eventually the only sane thing to do is to copy the "new from visible" to another image, and save that. RE: Export all opened images in GIMP at once - PixLab - 12-07-2023 (12-07-2023, 12:00 AM)Ofnuts Wrote: The trick is to use RUN_INTERACTIVE on the first iteration and RUN_WITH_LAST_VALS on the next. There are some gotchas, because the varoius file plugins don't react all the same way with these values, some save the layer and other save the whole image so eventually the only sane thing to do is to copy the "new from visible" to another image, and save that. Thanks Ofnuts for your help, it helped to "orient" my mind I opened a topic over-there because I'm trying to create a variable with a condition to switch between interactive and last-vals > https://www.gimp-forum.net/Thread-I-need-help-to-declare-a-variable-or-a-function-in-scheme For the new from visible to another image, I'll try to find out the Scheme's vocabulary/grammar for that Thanks for all the tips RE: Export all opened images in GIMP at once - licryle - 09-18-2024 (12-07-2023, 02:55 AM)PixLab Wrote:I literally created an account here to say "thank you"(12-07-2023, 12:00 AM)Ofnuts Wrote: The trick is to use RUN_INTERACTIVE on the first iteration and RUN_WITH_LAST_VALS on the next. There are some gotchas, because the varoius file plugins don't react all the same way with these values, some save the layer and other save the whole image so eventually the only sane thing to do is to copy the "new from visible" to another image, and save that. You saved me a good hour or 2 of manual labor. |