Any way to record actions taken on one image and apply them to entire directory? - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: Any way to record actions taken on one image and apply them to entire directory? (/Thread-Any-way-to-record-actions-taken-on-one-image-and-apply-them-to-entire-directory) |
Any way to record actions taken on one image and apply them to entire directory? - maple - 09-21-2021 I am not a frequent or expert GIMP user, in fact I don't do a lot of image editing at all, and most of what I do do is very simple stuff like cropping an image. So please don't assume I have a lot of prior knowledge about GIMP. What I was wanting to know is if there is any way to load an image, record the actions I take to modify that image and the options used when saving it, and then apply that to several hundred other images in a directory. To be more specific, what I have is several hundred images that have a significant transparent border. All I want to do is automatically crop the images so that all the excess transparency is discarded. If I were doing this on a single image, I would do it this way:
RE: Any way to record actions taken on one image and apply them to entire directory? - PixLab - 09-21-2021 BIMP plugin for batch process in GIMP -> https://alessandrofrancesconi.it/projects/bimp/ Quote:Use the fuzzy select in any corner to select the transparent part Not the fuzzy, but "Alpha to selection" (don't use "tools" of the tool box as it imply manual actions, use automated "functions" instead) But Literal answers to questions where the process in it is already suspicious cannot be good. I would like to see a png example "before->after" to have a clue about exactly what's your needs, because it seems that in the end you just want to "Crop to content"... thus no need to select and so. Surely Imagemagick could be a better choice using terminal https://imagemagick.org/index.php (wait for rich2005 or Ofnuts, they know well about this) RE: Any way to record actions taken on one image and apply them to entire directory? - rich2005 - 09-21-2021 Quote:I have is several hundred images that have a significant transparent border. All I want to do is automatically crop the images so that all the excess transparency is discarded. If I were doing this on a single image, I would do it this way: ...and I would do it this way Image -> Zealous Crop Take a single image. Try zealous crop. If it works then it cam be applied to a folder full of images using BIMP https://alessandrofrancesconi.it/projects/bimp/ There are examples on the web page. Add other Gimp Procedure and search for "zealous", then add the BIMP 'change format` operation to set up your png options. Set the output folder and away you go. RE: Any way to record actions taken on one image and apply them to entire directory? - PixLab - 09-21-2021 (09-21-2021, 08:37 AM)rich2005 Wrote: ...and I would do it this way Image -> Zealous Crop Oh, I thought that "Zealous crop" was a script I did installed few years ago, so it's a part of original GIMP Thanks for the wake up. RE: Any way to record actions taken on one image and apply them to entire directory? - maple - 09-21-2021 First thanks for the responses, but BIMP doesn't work for me. I tried installing the MacOS version using the installer script that comes with the package, and it did actually install it, nut according to their web site 'You will find "Batch Image Manipulation..." inside the "File" menu.' Except I didn't, nor did I find it under any of the other menus. And I have no idea why, unless the version of BIMP on their site is incompatible with GIMP 2.10.14. And I downloaded it from https://github.com/alessandrofrancesconi/gimp-plugin-bimp/releases/download/v2.6/gimp-plugin-bimp_macos.tar.gz, which appears to be the correct download link on the page at https://github.com/alessandrofrancesconi/gimp-plugin-bimp/releases/tag/v2.6 so I just have no idea why it won't show up in my "File" menu. EDIT: It was incompatible with 2.10.14, apparently. Upgrading to 2.10.24 (the latest MacOS version) allowed it to show up in the "File" menu. Now I just have to figure out how to use it! EDIT 2: Well it sort of works - the "Zealous Crop" actually does work, but if I also try to apply a slight bit of gaussian blur then it produces files that contain no image at all for some reason, and if I use selective gaussian blur then it creates files with blocky colored lines in them. But it does do the thing I really wanted, so thanks much! RE: Any way to record actions taken on one image and apply them to entire directory? - rich2005 - 09-22-2021 Quote:EDIT 2: Well it sort of works - the "Zealous Crop" actually does work, but if I also try to apply a slight bit of gaussian blur then it produces files that contain no image at all for some reason, and if I use selective gaussian blur then it creates files with blocky colored lines in them. ... Thanks for the updates on progress. There are no regular MacOS users on this forum. Nice to know that BIMP does work in some circumstances. The usual caveat: It all depends on the image(s) You might have to apply BIMP as two separate operations or it might be the order the procedures are applied in BIMP. A do get a single operation working here, (1) both for gaussian blur and selective-gaussian blur. Note a search for blur and a search for gauss brings up completely different procedures. Most of the blur functions are now GEGL operations which BIMP does not recognise. GEGL operations are not easily scripted. What you see is a backward compatibly 'plug-in' which is good but might not exactly coincide with the GEGL operation. The selective-gaussian-blur is a good example. You can find the GEGL parameters here: https://gegl.org/operations/gegl-gaussian-blur-selective.html with radius max 1000 / delta 1.0 (2) which does not coincide with the compatibility plugin. You need to make some interpolation. (3) However that does work here, at least on a test image, inset (4) All-in-one screenshots [attachment=6725] |