downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

image_type_to_mime_type> <getimagesizefromstring
[edit] Last updated: Fri, 17 May 2013

view this page in

image_type_to_extension

(PHP 5)

image_type_to_extensionObtiene la extensión de un tipo de imagen

Descripción

string image_type_to_extension ( int $imagetype [, bool $include_dot = TRUE ] )

Devuelve la extensión de la constante IMAGETYPE_XXX dada.

Parámetros

imagetype

Una de las constantes IMAGETYPE_XXX.

include_dot

Si le antecede un punto a la extensión. Por defecto es TRUE.

Valores devueltos

Una cadena con la extensión correspondiente al tipo de imagen dado.

Ejemplos

Ejemplo #1 Ejemplo de image_type_to_extension()

<?php
// Crear una instancia de imagen
$im imagecreatetruecolor(100100);

// Guardar imagen
imagepng($im'./prueba' image_type_to_extension(IMAGETYPE_PNG));
imagedestroy($im);
?>

Notas

Nota:

Esta función no requiere la librería GD image.



image_type_to_mime_type> <getimagesizefromstring
[edit] Last updated: Fri, 17 May 2013
 
add a note add a note User Contributed Notes image_type_to_extension - [14 notes]