Inicio PHP JavaScript Manual PHP Links de interes Contacto
Scripts en PHP Programación PHP, lenguaje del lado del servidor.
Scripts PHP - Funciones Funciones  Scripts PHP - Ip´s Ip´s  Scripts PHP - Otros Otros  
Scripts en JavaScript Programación JavaScript, lenguaje del lado del cliente.
Scripts JS - Barra de estado Barra de estado  Scripts JS - Calculadoras Calculadoras  Scripts JS - Efectos Efectos  Scripts JS - Relojes/Calendarios Relojes/Calendarios  
  Manual PHP     Manual PHP  
function.exif-thumbnail -- http://www.mundoscript.com/php/function.exif-thumbnail.html exif_thumbnail

exif_thumbnail

(PHP 4 >= 4.2.0, PHP 5)

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

Description

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

exif_thumbnail() reads the embedded thumbnail of a TIFF or JPEG image. If the image contains no thumbnail FALSE will be returned.

The parameters width, height and imagetype are available since PHP 4.3.0 and return the size of the thumbnail as well as its type. 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.

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

Ejemplo 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";
}
?>

Starting from version PHP 4.3.0, the function exif_thumbnail() can return thumbnails in TIFF format.

Nota: This function is only available in PHP 4 compiled using --enable-exif. Its functionality and behaviour has changed in PHP 4.2.0

Nota: This function does not require the GD image library.

See also exif_read_data() and image_type_to_mime_type().

Web´s ORO

Comparativas

peliculas - musica - trucos
telefonos moviles
directorio de programacion
Web´s PLATA

logiciel gratuit
programas para bajar
ocio y entretenimiento
eliminar virus