Find JPEG resolution with PHP

后端 未结 5 890
隐瞒了意图╮
隐瞒了意图╮ 2020-12-28 11:09

Calling all PHP gurus!

I understand that you can use getimagesize() to get the actual pixel height and width of an image in PHP. However, if you open an image in pho

5条回答
  •  自闭症患者
    2020-12-28 11:52

    SOLUTION: User the PHP JPEG Metadata Toolkit - downloaded from here: http://www.ozhiker.com/electronics/pjmt/

    This toolkit has some handy scripts that will do all sorts of things, including viewing and editing of the header, metadata, and jfif information in jpeg file. Here is a script that gives you the XDensity and the YDensity (the x and y print resolution) of a jpg:

    ");
    print( "YDensity:" . $image_info['YDensity'] . "
    "); ?>

提交回复
热议问题