首页建站经验 PHP获取Exif缩略图的方法

PHP获取Exif缩略图的方法

本文实例讲述了PHP获取Exif缩略图的方法。分享给大家供大家参考。具体实现方法如下:// file to read$file = 'test.jpg';$image = exif_thumbnail($file, $width, $height, $…

本文实例讲述了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程序设计有所帮助。

本文来自网络,不代表1号站长-站长学院|资讯交流平台立场。转载请注明出处: https://www.1cn.cc/jianzhan/jingyan/17948.html
上一篇php简单判断两个字符串是否相等的方法
下一篇 php实现的简单美国商品税计算函数
admin

作者: admin

这里可以再内容模板定义一些文字和说明,也可以调用对应作者的简介!或者做一些网站的描述之类的文字或者HTML!

为您推荐

评论列表()

    联系我们

    联系我们

    0898-88888888

    在线咨询: QQ交谈

    邮箱: email@wangzhan.com

    工作时间:周一至周五,9:00-17:30,节假日休息

    关注微信
    微信扫一扫关注我们

    微信扫一扫关注我们

    关注微博
    返回顶部