Page 1 of 1

Can ImageMagick create a batch process so that one image is converted to multiple image sizes as a batch job?

Posted: 2016-01-25T11:46:27-07:00
by M2Matthias
Hi there,

We do not use ImageMagick and are newbies. But we wonder if ImageMagick can be setup to run in the following way:

1. Create multiple image dimensions for social media apps as in Twitter, LinkedIn, Facebook (FB has three different size requirements based on if it is a post, or an advertisement image, etc) etc.
2. Drag in an image(s), click a button and recei for each image, a resized image for each template we have set up. So one image gets us, for example 10 differently resized images.

We've seen programs that run batch resize jobs for a single resize output. We want a user defined batch job that enables one image to be output into multiple formats with one click.

Thanks for your help,

M2

Re: Can ImageMagick create a batch process so that one image is converted to multiple image sizes as a batch job?

Posted: 2016-01-25T11:58:03-07:00
by snibgo
An ImageMagick command can look like this, in outline:

Code: Select all

convert
  in.png
  ( +clone -resize 100x50 +write first.png +delete )
  ( +clone -resize 300x200 +write second.jpg +delete )
  ( +clone -resize 400x200 +write third.tiff +delete )
  NULL:
This example has one input and creates three outputs at different sizes. There can be as many as you want. You might also want to do some sharpening as well as resizing.

"+delete" removes the image from memory, after it has been saved to file with "+write".