News for hackers. Stuff that matters.
Re:Gimp is 25 years old today by tartoran on Sunday November 22, 2020 @02:35AM (#25175725)
Gimp has script fu / python / scheme. It is quite capable of automating and generating images. Gimp is the kind of software you may hate at first but then start to love it for how extensible friendly it is.
Re:Gimp is 25 years old today by ThePadawan on Sunday November 22, 2020 @03:18AM (#25175883)
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.

Re:Gimp is 25 years old today by mkl on Sunday November 22, 2020 @03:58AM (#25176031)
Why 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.
Re:Gimp is 25 years old today by ThePadawan on Sunday November 22, 2020 @04:09AM (#25176075)
I 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.

Re:Gimp is 25 years old today by LaputanMachine on Sunday November 22, 2020 @05:19AM (#25176342)
I 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?

Re:Gimp is 25 years old today by ThePadawan on Sunday November 22, 2020 @05:48AM (#25176474)
I'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.

Re:Gimp is 25 years old today by Phlogistique on Sunday November 22, 2020 @04:12AM (#25176092)
I 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.
Re:Gimp is 25 years old today by prokoudine on Sunday November 22, 2020 @03:37AM (#25175951)
BIMP plugin for GIMP
Re:Gimp is 25 years old today by agumonkey on Sunday November 22, 2020 @06:58PM (#25182234)
Sure, it's extensible but I was speaking on all the other fronts.