<?php /** * Imagick分析图像属性 * @author :Refer Con www.phpcq.com * 由于时间问题,没写注释,请见谅! */ $im = new Imagick( "fujifilm-dx10.jpg\" ); $identify = $im->identifyImage(); echo \''Image geometry: \'' , $identify[\''geometry\''][\''width\''] , \''x\'' , $identify[\''geometry\''][\''height\''] , \''<br />\''; echo \''Image format: \'' , $identify[\"format\"] , \''<br />\''; echo \''Image type: \'' , $identify[\"type\"] , \''<br />\''; echo \''Image compression: \'' , $identify[\"compression\"] , \''<br />\''; echo \''Image size: \'' , $identify[\"fileSize\"] , \''<br />\''; echo \''<br /><br />\''; echo \''<b>All image properties:</b> <br />\'';
foreach ( $im->getImageProperties() as $k => $v ) { echo $k , \'' => \'' , $v , \''<br />\''; } echo \''<br /><br />\'';
foreach ( $im->getImageProfiles() as $k => $v ) { echo \"Profile name: \", $k , \" (size: \", strlen( $v ) ,\") <br />\"; } ?> (责任编辑:admin) |