Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

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?

share|improve this question
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
show 3 more comments

2 Answers

up vote 8 down vote accepted

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

share|improve this answer
    
+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
add comment

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

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

share|improve this answer
    
Though I love the idea of LISP, I can never quite read it well enough to write anything in it... blenderartists.org/forum/showthread.php?t=84073&page=1 was more handy, because it talks about Python-based GIMP batch scripting... Still haven't cracked this problem though. –  ixtmixilix Jan 20 '11 at 21:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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