Page 1 of 1

[FIXED] Batch changing resolution in PNG

Posted: 2008-11-24T13:33:57-07:00
by Mazin
I'm trying to change the resolutions of a batch of PNG files. Right now, they are at 72dpi, but they need to be set to 300dpi (no rescaling). This is because the dpi is used when I convert them into PDF, resulting in incorrect PDF page sizes.

I try

Code: Select all

mogrify -density 300x300 page*.png
but nothing changes. The only way I can change them is to go into GIMP and manually set the resolution (Print Size option) one-by-one.

Any suggestions?

Re: Batch changing resolution in PNG

Posted: 2008-11-24T13:39:32-07:00
by fmw42
Mazin wrote:I'm trying to change the resolutions of a batch of PNG files. Right now, they are at 72dpi, but they need to be set to 300dpi (no rescaling). This is because the dpi is used when I convert them into PDF, resulting in incorrect PDF page sizes.

I try

Code: Select all

mogrify -density 300x300 page*.png
but nothing changes. The only way I can change them is to go into GIMP and manually set the resolution (Print Size option) one-by-one.

Any suggestions?

I don't know if you can use page*.png, I think you have to use just *.png

see http://www.imagemagick.org/Usage/basics/#mogrify for more details on mogrify and using directories to protect your files (or make backups) as mogrify can be dangerous.

Re: Batch changing resolution in PNG

Posted: 2008-11-24T13:48:40-07:00
by Mazin
Erm, I meant that in this particular case, my files are named page00.png, page01.png, etc.

I understand the implications of using mogrify, and it is clearly modifying my files when I run the command. It just isn't setting the resolution.

Re: Batch changing resolution in PNG

Posted: 2008-11-24T13:57:32-07:00
by magick
We have a patch for the problem you reported. A fix will be available in the next point release of ImageMagick available sometime tomorrow. Thanks.