In May last year I wrote a post about ImageMagick and some neat features. Now I think it is time for some more features. I was browsing the net on the hunt for some additional feature I like to post on my blog. I showed you the commands mogrify and convert. Convert has some additional option I like to show you.
As you might remember we can use convert to actually convert one format for example png to jpg like this:
convert mypicture.png mypicture.jpg
we can also reduce the picture quality:
convert mypicture.png -quality 75 mypicture.jpg
this will reduce the output picture to a 75% of its original. You can also resize a picture to a specified dimension:
convert mypicture.jpg -resize 640×480 mypicture.jpg
the problem with the command above it the imagemagick tries to preserve the original aspect ratio and make it fit within the specified dimension but if you like to break that and force it to convert is in the desired dimension use the command as followed:
convert mypicture.jpg -resize 640×480! mypicture.jpg
Now lets say you took a picture while you flipped the camera in a 90% angle, with the command below you can rotate the picture clockwise.
convert mypicture.jpg -rotate 90 mypicture.jpg
It’s time for the real cool stuff. ImageMagick provides also effects.
convert mypicture.jpg -charcoal 3 mypicture.jpg
This for example applies the charcoal effect with an intensity of 3. Then there is the implode effect.
convert mypicture.jpg -implode 2 mypicture.jpg
You can also combine all of those together if you like. If you like to know more about ImageMagic and it’s command line function check out this link.
I hope you enjoyed this quick and dirty post. If you know something cool you can do with ImageMagick let me know.