Technology and Software

Batch converting images with ImageMagick

Another years late post.

Suppose you want to convert the blue Dojo Toolkit theme to another color. How you do it? Run this command of the ImageMagick suit on all the images in the src/widget/templates hierarchy

convert -modulate 100,100,45 <blue_image.xyz> <green_image.xyz>

This rotates the color wheel by 45 degrees and keeps the other parameters constant. The result is a light green theme. You have to update all the css files too and that’s way more time consuming. However, with a simple conversion can applies to HTML colors with this particular color rotation : just convert all the occurences of #rrggbb into #rrbbgg!

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s