4 ms·
I tried to automate a simple workflow (resize, reduce color to grayscale) using GIMP just last week. I would want to run this on ~100 files in a folder. This t
by ThePadawan 6y ago
I tried to automate a simple workflow (resize, reduce color to grayscale) using GIMP just last week. I would want to run this on ~100 files in a folder.
This takes a few lines of calls to imagemagick/gm or ~10 lines of python + Pillow.
Do you have any resources how to do this in GIMP?
After googling for a good while, I could not for the life of me figure out how to even get started with this.
I don't want to write an extension for GIMP - I want to use GIMP like I would an image manipulation library.
- prokoudine 6y agoBIMP plugin for GIMP
- mkl 6y agoWhy do you want to do it in GIMP? I like and use GIMP, but imagemagick sounds like the right tool for the job, and what I'd use there. For almost any batch processing, Python or bash-scripted imagemagick gets the job done. If you need some complex feature of a GIMP plugin, that's another story.
- ThePadawan 6y agoI simply found that GIMP produced very good results when dithering to 4bit grayscale (I'm converting images to be displayed on an e-ink display). I'm sure I could get any other lib to produce the same results, but only after an hour of tweaking. That is what I ended up doing after all, because learning how to automate GIMP was harder.
- LaputanMachine 6y agoI also use a 4 bit e-ink display, and there are sometimes large areas of the same color where you can't see any details. After several hours of tweaking I managed to improve the quality, but it's still not perfect. Do you have some tips / links that could help me improve the dithering even further?
- ThePadawan 6y agoI've not investigated very deeply into it. For my use case (a digital picture frame), I've simply rejected images that looked very bad after dithering, and that's very often - (a) generally dark images, - (b) very gradient-based images (banding appears) and - (c) art with a color spectrum that's very narrow in lightness, but wide in value (i.e. most colors map to the same level of gray after converting to grayscale) Besides using Floyd-Steinberg dithering, I have not tried anything fancy. As I mentioned above, the exact quality of differing varies by a large amount depending on the tool. I would recommend comparing the quality of GIMP vs. other tools on a single example image.
- Phlogistique 6y agoI did this very long ago. It's possible but the documentation was nearly non-existant, it took me a long time to figure it out.