Batch resample images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ziotibia81

Batch resample images

Post by ziotibia81 »

Hello!!

I've 1000 images on a directory. Same images is 1200dpi, others 1700dpi, others 900dpi ecc ecc.
I need to resample all imaget at 600dpi but preserving dimensions.

If an image in 1200dpi was 40x40mm i need to resample it at 600dpi but dimension have to remain 40x40mm,
an other image is 60x60mm at 1700dpi and need to be converted as 60x60mm 600dpi ecc ecc....

Is possible using "convert" command?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Batch resample images

Post by fmw42 »

ziotibia81 wrote:Hello!!

I've 1000 images on a directory. Same images is 1200dpi, others 1700dpi, others 900dpi ecc ecc.
I need to resample all imaget at 600dpi but preserving dimensions.

If an image in 1200dpi was 40x40mm i need to resample it at 600dpi but dimension have to remain 40x40mm,
an other image is 60x60mm at 1700dpi and need to be converted as 60x60mm 600dpi ecc ecc....

Is possible using "convert" command?

convert inputimage -density XX outputimage

where XX is your desired density

see http://www.imagemagick.org/script/comma ... hp#density
ziotibia81

Re: Batch resample images

Post by ziotibia81 »

interesting.....
But I need to call convert manually for each of 1000 images... :(
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Batch resample images

Post by fmw42 »

ziotibia81 wrote:interesting.....
But I need to call convert manually for each of 1000 images... :(

Then use mogrify with -density.

see http://www.imagemagick.org/Usage/basics/#mogrify
ziotibia81

Re: Batch resample images

Post by ziotibia81 »

:D

Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!
Post Reply