AI编程助手
AI免费问答

PHP获取Exif缩略图的方法,获取exif缩略图_PHP教程

  2016-07-13 09:46   901浏览 原创

php获取exif缩略图的方法,获取exif缩略图

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

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1031488.htmlTechArticlePHP获取Exif缩略图的方法,获取exif缩略图 本文实例讲述了PHP获取Exif缩略图的方法。分享给大家供大家参考。具体实现方法如下: // file to...

php免费学习视频:立即学习
踏上前端学习之旅,开启通往精通之路!从前端基础到项目实战,循序渐进,一步一个脚印,迈向巅峰!

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。