I have many image files, each in different dpi,
I need to convert (resize) all of them to 150 dpi,
I mean :
if an image size is 1000x1000 @ 300 dpi, It must be resized to 500x500
if an image size is 1000x1000 @ 600 dpi, It must be resized to 250x250
So, Both resize and density change are needed,
How do I do this using Convert utility
changing density does not resize.
Thanks
Batch Resize to 150dpi
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Batch Resize to 150dpi
Perhaps "-resample" does what you want. See http://www.imagemagick.org/script/comma ... p#resample
snibgo's IM pages: im.snibgo.com
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Batch Resize to 150dpi
This can be done very easily with ImageMagick 7. What IM version are you using and what operating system are you working on?dakheli54 wrote:I have many image files, each in different dpi,
I need to convert (resize) all of them to 150 dpi,
I mean :
if an image size is 1000x1000 @ 300 dpi, It must be resized to 500x500
if an image size is 1000x1000 @ 600 dpi, It must be resized to 250x250
Edited: The simple answer is to use "-resample" as mentioned above by snibgo.
Re: Batch Resize to 150dpi
snibgo & GeeMack,Thanks for prompt response,
A newbie in this, I use IM7 Convert utility in Win10.
from the description of -resample, a final resolution must be defined , don't know how to do it in batch operation.
A newbie in this, I use IM7 Convert utility in Win10.
from the description of -resample, a final resolution must be defined , don't know how to do it in batch operation.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Batch Resize to 150dpi
To resample all the jpg files in your currect directory:
But do a backup first in case this doesn't do what you want.
Code: Select all
magick mogrify -resample 150 *.jpg
snibgo's IM pages: im.snibgo.com
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Batch Resize to 150dpi
If the number and size of images in your current working directory fit in your memory it can be as simple as this...dakheli54 wrote:from the description of -resample, a final resolution must be defined , don't know how to do it in batch operation.
Code: Select all
magick mogrify -resample 150 *.jpg