Документация PHP


exif_tagname

read_exif_data

Exif Функции

PHP Manual


exif_thumbnail

(PHP 4 >= 4.2.0, PHP 5)

exif_thumbnail — Retrieve the embedded thumbnail of a TIFF or JPEG image

Описание

string exif_thumbnail ( string $filename [, int &$width [, int &$height [, int &$imagetype ]]] )

exif_thumbnail() reads the embedded thumbnail of a TIFF or JPEG image.

If you want to deliver thumbnails through this function, you should send the mimetype information using the header() function.

It is possible that exif_thumbnail() cannot create an image but can determine its size. In this case, the return value is FALSE but width and height are set.

Список параметров

filename

The name of the image file being read. This image contains an embedded thumbnail.

width

The return width of the returned thumbnail.

height

The returned height of the returned thumbnail.

imagetype

The returned image type of the returned thumbnail. This is either TIFF or JPEG.

Возвращаемые значения

Returns the embedded thumbnail, or FALSE if the image contains no thumbnail.

Список изменений

Версия Описание
4.3.0 The optional parameters width , height , and imagetype all became available.
4.3.0 May return thumbnails in the TIFF format.

Примеры

Пример #1 exif_thumbnail() example

<?php
if (array_key_exists('file'$_REQUEST)) {
    
$image exif_thumbnail($_REQUEST['file'], $width$height$type);
} else {
    
$image false;
}
if (
$image!==false) {
    
header('Content-type: ' .image_type_to_mime_type($type));
    echo 
$image;
    exit;
} else {
    
// no thumbnail available, handle the error here
    
echo 'No thumbnail available';
}
?>

Смотрите также


exif_tagname

read_exif_data

Exif Функции

PHP Manual

SAPE все усложнил?

MainLink - простая и прибыльная продажа ссылок!

Последние поступления:

Размещена 10 августа 2020 года

Я по ТВ видел, что через 10 лет мы будем жить лучше, чем в Германии...
Я не понял, что это они с Германией сделать хотят?!

читать далее…

ТехЗадание на Землю

Размещена 14 марта 2018 года

Пpоект Genesis (из коpпоpативной пеpеписки)

читать далее…

Шпаргалка по работе с Vim

Размещена 05 декабря 2017 года

Vim довольно мощный редактор, но работа с ним не всегда наглядна.
Например если нужно отредактировать какой-то файл например при помощи crontab, без знания специфики работы с viv никак.

читать далее…

Ошибка: Error: Cannot find a valid baseurl for repo

Размещена 13 сентабря 2017 года

Если возникает ошибка на centos 5 вида
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/

читать далее…

Linux Optimization

Размещена 30 июля 2012 года

Prelink

читать далее…