A5下载 - 努力做内容最丰富最安全的下载站!

A5站长下载站

当前位置:A5下载 > 源码技巧 > 其它源码教程 > PHP获取Exif缩略图的方法

PHP获取Exif缩略图的方法

时间:2015-07-13 16:32作者:fang人气:49

本文实例讲述了PHP获取Exif缩略图的方法。分享给大家供大家参考。具体实现方法如下:

// file to read

$file = 'test.jpg';

$image = exif_thumbnail($file, $width, $height, $type);

// width, height and type get filled with data

// after calling "exif_thumbnail"

if ($image) {

// send header and image data to the browser:

header('Content-type: ' .image_type_to_mime_type($type));

print $image;

}

else {

// there is no thumbnail available, handle the error:

print 'No thumbnail available';

}

希望本文所述对大家的php程序设计有所帮助。

标签PHP,获取,Exif,略图,方法,本文,实例,讲述了,PH

相关下载

查看所有评论+

网友评论

网友
您的评论需要经过审核才能显示

公众号