《PHP學習:PHP獲取Exif縮略圖的方法》要點:
本文介紹了PHP學習:PHP獲取Exif縮略圖的方法,希望對您有用。如果有疑問,可以聯系我們。
PHP編程本文實例講述了PHP獲取Exif縮略圖的辦法.分享給大家供大家參考.具體實現辦法如下:
PHP編程
// 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程序設計有所贊助.
維易PHP培訓學院每天發布《PHP學習:PHP獲取Exif縮略圖的方法》等實戰技能,PHP、MYSQL、LINUX、APP、JS,CSS全面培養人才。