4

This is by far my most common task, and I'd say I've wasted about 1000 mouse clicks on it in my raster-based program.

Because it's so common for me to start off desaturating an image and then posterizing it, I'd like to write a shell script that does the same, that way I can process an entire directory automagically and simply get on with my work... There are only so many hours in the day. If I can make my computer do all the mouse clicks for me, go away and drink a few cups of coffee while it does so, then come back to it, that's infinitely better for me.

So how can I accomplish these two tasks using the CLI?

  • 1
    It'd help to mention GIMP in your question. Took me a few minutes to figure out what app you were using! I don't have an answer for you but am interesting in seeing if others come up with. An easy way to script The GIMP would be useful. There is Script-Fu, though I haven't looked at that in much detail: docs.gimp.org/en/gimp-concepts-script-fu.html – DA01 Jan 20 '11 at 16:19
  • What are doing this with now? There might be scripting-based, non-CLI options available to you in your current set of tools. This, of course, largely depends on whether your application of choice offers an API to target a script. – Philip Regan Jan 20 '11 at 16:24
  • 1
    @ixt "Command line" might be a reasonable translation that works on a non-IT-centric site. – Pekka 웃 Jan 20 '11 at 21:09
  • @DA01, I'm not asking for an application-specific method. Unfortunately the graphics design community does not seem to have vocabulary that crosses the boundaries drawn by operating systems. – ixtmixilix Jan 20 '11 at 21:11
  • Uh...you tagged in GIMP. Are you not using The GIMP? – DA01 Jan 20 '11 at 21:26
8

ImageMagick is the most awesome and powerful CLI image editing tool I know. It runs on most operating systems.

  • +1 for linking to the discussion about desaturation. I already knew how to do it this way and found it unsatisfactory since ImageMagick doesn't give you as many options for desaturation as GIMP does. Otherwise the -posterize parameter does exactly what I need. So I may end up doing it by using one big script that makes a call to both GIMP and ImageMagick. – ixtmixilix Jan 20 '11 at 21:06
  • @ixt I can relate! I never managed to get my head around the alchemies of GIMP, either. :) – Pekka 웃 Jan 21 '11 at 15:46
  • 1
    Ever since I learned of ImageMagick I use it all the time in Python scripts to batch process entire directories of images. – jhocking Apr 9 '11 at 21:56
3

This is typically called batch processing and GIMP supports it. More info:

http://www.gimp.org/tutorials/Basic_Batch/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.