如何使用PHP检查Photo DPI [英] How to Check Photo DPI with PHP
本文介绍了如何使用PHP检查Photo DPI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Possible Duplicate:
Get/set DPI with PHP GD/Imagick?
是否可以使用php检查照片dpi.我有300 dpi和72 dpi的照片.但是想要一种自动计算dpi的方法.
Is there a possible way to check photo dpi with php. I have 300 dpi and 72 dpi photos. but wants a way to calculate dpi automatically.
推荐答案
现在检查我为时已晚,但我认为您正在寻找 Imagick::setImageResolution()
,如果您需要更改DPI.
It's too late for me to check now but I think you're looking for Imagick::getImageResolution()
and Imagick::setImageResolution()
if you need to change the DPIs.
我认为GD无法做到这一点,我相信它会将所有图像转换"为72个DPI.
I don't think this is possible with GD, I believe it "converts" all images to 72 DPIs.
这篇关于如何使用PHP检查Photo DPI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文