Technology Insights

How to Batch Resize Image from Linux Shell with ImageMagick

ImageMagick is a really cool product. Not only is it open source but its very powerful tool. My goal was to figure out how to batch resize images while keeping one side 640 pixels wide. I ended up using ImageMagick’s mogrify by issuing the command below at my CentOS shell prompt.

mogrify -resize x640 *.jpg

or

mogrify -resize 640 *.jpg

Depending on which side you want to be 640 pixels. If you would like for image magic to make the largest side 640 and constrain the proportions use the following command.

Technology Insights

WordPress NextGen Gallery Watermarking With Images Not Working

When I first installed NextGen Gallery plugin for WordPress I could not get the watermarking working. I read of all sorts of problems with it including FreeType not being installed, permission problems, etc. but everything that I was trying was not resolving my issue. During upload I was not getting any errors so at the time I felt I had little to go on. To make a long story short I finally read a post on WordPress.org that said the watermark image has to be a PNG for it to work. I saved my watermark file as a .png file and sure enough it worked without issue.