Jai’s Weblog – Tech, Security & Fun…

Tech, Security & Fun…

  • Jaibeer Malik

    Jaibeer Malik
  • View Jaibeer Malik's profile on LinkedIn
  • Subscribe

  • Feedburner

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 28 other followers

  • Archives

  • Categories

  • Stats

    • 277,355
  • Live Traffic

ImageMagick: Mogrify vs Convert? Which one to use and when?

Posted by Jai on October 18, 2012

ImageMagick provides the flexibility to use commands like mogrify and convert to do the same operation. Sometimes it is very hard for users to figure out which command line utility to use and in which scenario one would be better than other one.

In this post, we will have a look at some of such scenario where we will see which command will fit better than the other one.

Mogrify as stated in the documentation, is similiar to convert except that the original image file is overwritten.

Image Processing

Mogrify does processing on the same image, it reads file modify file and writes the output to the same file.
Convert is meant to work on separate images, reads file and modify and write to different file/format. You can also use convert command to use output file same as input file.

Batching Process:

Mogrify is a mainly used for batch processing, which means you want to modify existing files in batch mode. The batch mode operation is much faster and same images will be modified.

Piping Commands

Convert command provides you additional flexibility to use multiple commands in piped format. You can combine multiple convert commands in single command and can pass the output of one command as input of another command.

Efficiency

Mogrify is more efficient for batch processing and convert is more efficient for multiple operation and piped operations on same file.

Use each command wisely based on your requirements and see which one fits you in which scenario.

About these ads

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

 
Follow

Get every new post delivered to your Inbox.

Join 28 other followers

%d bloggers like this: