Page 1 of 1

Why can't I change dpi on my jpg picture?

Posted: 2009-06-08T23:11:54-07:00
by benny
This is my code:

Code: Select all

$exec = "convert '$input' -resize 535x535 -units PixelsPerInch -density 72 -quality 60 '$output'";
The source file is a 10 mb tif file that I'm converting to a jpg. The dpi on the tif file is 900, the dpi on the jpg is still 900. Why does my code not change the dpi on my jpg to 72?

Re: Why can't I change dpi on my jpg picture?

Posted: 2009-06-10T01:17:25-07:00
by anthony
If you read the TIF and JPG files in photoshop, that it is not using the normal DPI setting, but the one in the PHotoshop specific meta-data profile. You could -strip all those profiles to remove it.

Re: Why can't I change dpi on my jpg picture?

Posted: 2009-08-11T13:57:51-07:00
by fluidmindorg
Awesome! Just adding -strip fixed it for me.

Thanks a lot, man!

--Dan