English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Elaborazione delle Immagini PHP
image_type_to_extension — Restituisce il suffisso del nome del file corrispondente al tipo di immagine specificato.
string image_type_to_extension ( int $imagetype [, bool $include_dot = TRUE ] )
Restituisce il suffisso del nome del file in base al tipo di immagine specificato da IMAGETYPE_XXX.
<?php // Crea un esempio di immagine $im = imagecreatetruecolor(100, 100); // Salva l'immagine in formato png imagepng($im, './test' . image_type_to_extension(IMAGETYPE_PNG)); imagedestroy($im); ?>
Eseguire il file sopra genererà un'immagine test.png nella directory corrente.