enrii.blog

A passionate programmer’s findings in the world of internet.

Right Click to Convert Image Format

Sunday, May 6th, 2007

I'm quite annoyed to see badly converted images on the web. They typically print screen and paste it on Microsoft Paint, then save as JPG. JPG files created that way look awful to me. I'm writing this to create a right-click shortcut to convert any image format to JPG nicely, with the help of ImageMagick command-line tools.

  1. Download ImageMagick, the Q16, DLL version from ImageMagick Download Page.
  2. Install the program.
  3. Start Registry Editor, start > run > regedit.
  4. Go to HKEY_CLASSES_ROOT\*\shell
  5. Right click on shell > New > Key
  6. Type in: Convert to JPG
  7. Right click on "Convert to JPG" > New > Key
  8. Type in: command
  9. Select "command". Double click on "(Default)" on your right to change its value.
  10. Type in with the double quotes: "C:\Program Files\ImageMagick-6.3.4-Q16\mogrify.exe" -format jpg -quality 100 "%1"
    Take note of the ImageMagick installation path. You may need to modify that.

Your regedit would look something like this:

Regedit print screen for image convertion

Your right click menu will have an additional item, Convert to JPG. Once you click on it, a new JPG file will be generated.

I'm certain that there are better ways to do it, but with ImageMagick installed you can do much more stuffs like this. (See: the power of ImageMagick)