[BNM] Resizing images with PHP that aren't 72dpi
Jay Caines-Gooby
jay at gooby.org
Tue Oct 24 12:25:17 BST 2006
On 10/24/06, delarge <delargerock at gmail.com> wrote:
> Word up BNM posse...
>
> I have had a lot of success in the past with creating thumbs and resizing
> images on the fly with PHP....
> But now I need to do it with images that are straight from a camera - and
> many are not 72dpi - and have since found out that the scripts I am using
> won't work with images that aren't 72dpi.
> (scripts similar to this: http://www.zend.com/codex.php?id=893&single=1)
Imagemagick for PHP;
MagickSetImageResolution() is the function you need.
If you're working with photos, beware that Photoshop reads the image
res (incorrectly) from the EXIF data, and ignores the actual value in
the JPEG header, so you might need to strip the exif data completely
from the resized image to open it correctly in PS. Fireworks works
correctly, regardless.
--
Jay Caines-Gooby
jay at gooby.org
+44 (0)7956 182625
skype:jaygooby
http://snipperoo.com
http://blog.snipperoo.com
More information about the BNMList mailing list
BNMList is hosted by Screenlists, a Screen-Play.net service