0

I have a PNG which (besides a white spot and transparency in the background) is a pretty straight blue.

I would like to use convert from ImageMagick to partially desaturate it, so that I can create images with the original blue at one extreme, and regular desaturation (I know that color theory allows a lot of desaturations, but I'm just looking for GIMP-style desaturation.)

I would also like to lighten or darken the colors to an image.

Lastly, I would like to change the hue for the bulk of the images, to anything on the hue scale. (The image is a saturated blue.)

I can do all of these in GIMP but I am looking for a way to automate the process. I also want to resize down, but that much was clearer from the docs.

How can I do these adjustments?

Christos Hayward
  • 5,777
  • 17
  • 58
  • 113
  • Could you supply examples for the operations you want to perform (using GIMP, perhaps)? – Ani Jun 28 '12 at 14:07
  • relevant - http://stackoverflow.com/questions/2655322/how-to-use-imagemagick-to-batch-desaturate-images – Andrew Jun 28 '12 at 14:07
  • @Andrew, thank you; I'm looking for partial desaturation and partial desaturation doesn't jump out at me. – Christos Hayward Jun 28 '12 at 14:14
  • @ananthonline, for the grayscale, which is one dimension of the new scope of the changes, I could call GIMP's desaturate, and then progressively use the brightness-contrast tool for an increment of 32 to make it brighter or darker (two notches being two brightness-contrast changes at an increment of 32, not one at 64). – Christos Hayward Jun 28 '12 at 14:16
  • I've tried variations on "convert teardrop.png -colorspace HSL -modulate x,y,z test.png", and so far I haven't managed to duplicate the original image; the source image is blue and the converted image is green." – Christos Hayward Jun 28 '12 at 15:51

1 Answers1

2

This might help. It uses this image as input - I am not so artistic and is a pretty literal interpretation of your teardrop image description...

enter image description here

#!/bin/bash
for hue in $(seq 0 40 160); do
   for sat in $(seq 20 40 100); do
      convert -label "Sat:$sat,Hue:$hue" input.png -modulate 100,$sat,$hue  miff:-
   done
done | montage - -frame 5 -tile 3x m.png

enter image description here

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432