gimp: resize and "unsharp mask" via script

517 views Asked by At

I need to do the same operations for more than 60 files:

  • scale image
  • unsharpen mask

Is it possible to execute this from a script possibly passing the scale value ? I'm on Ubuntu if this could influence the answer.

edit: What I need to do is to resize some Android icons from 64x64 to 96x96 (as far, maybe other resolutions too). But these icons have already been blurred so, just increasing the size, I don't get a nice result. I've seen that if I resize to 96x96 and apply the "Unsharp Mask" filter with the default values (Radius: 5,0 - Amount: 0,50 - Threshold: 0), I get an acceptable result.

1

There are 1 answers

4
Mark Setchell On BEST ANSWER

As you are on Ubuntu, you likely already have ImageMagick installed - convert, identify and mogrify commands, amongst others.

So, make a copy of your data and try something like this on a copy:

mogrify -resize 640x480 -unsharp 6x3+1+0 *.jpg

or maybe this

mogrify -resize 1024x768 -sharpen 0x1.0 *.tif

to resize all JPEGs to 640x480 max and sharpen them, and in the second case to resize and sharpen a bunch of TIFFs.

If you specify your GIMP parameters I can probably make closer suggestions.