PHP获取Exif缩略图的方法

yipeiwu_com6年前PHP代码库

本文实例讲述了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 中文处理函数集合

--- 空格 --- string GBspace(string) --------- 每个中文字之间加空格 string GBunspace(string) ------- 每个中文字...

php查询whois信息的方法

本文实例讲述了php查询whois信息的方法。分享给大家供大家参考。具体如下: 这里使用php通过查询whois信息的网站列表进行查询 function whois_query($d...

php生成年月日下载列表的方法

本文实例讲述了php生成年月日下载列表的方法。分享给大家供大家参考。具体实现方法如下: 复制代码 代码如下:function mdy($mid = "month", $did = "da...

php实现发送微信模板消息的方法

本文实例讲述了php实现发送微信模板消息的方法。分享给大家供大家参考。具体如下: 该方法基于thinkphp实现实现,具体OrderPush.class.php文件如下: 复制代码 代码...

php mssql 分页SQL语句优化 持续影响

复制代码 代码如下:<?php /** * @Filename :page.sql.class.php * @CreatTime :2009-01-06 * @Descrition...