П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
Поиск по сайту:
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое








Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 3503 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 6104 раз(а).

Учебник HTML.
Просмотров 3267 раз(а).

Руководство по PHP5.
Просмотров 5486 раз(а).

Хостинг через призму DNS.
Просмотров 4125 раз(а).

Подборка текстов стандартных документов.
Просмотров 55763 раз(а).

Учебник PHP - Самоучитель
Просмотров 3078 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 5491 раз(а).

Внешние атаки...
Просмотров 3824 раз(а).

Учебник PHP.
Просмотров 2819 раз(а).

SSI в примерах.
Просмотров 37454 раз(а).



 
 
| Добавить в избранное | Сделать стартовой | Помощь





Руководство по PHP
Пред. След.

imagegif

(PHP 3, PHP 4, PHP 5)

imagegif -- Output image to browser or file

Description

bool imagegif ( resource image [, string filename] )

imagegif() creates the GIF file in filename from the image image. The image argument is the return from the imagecreatetruecolor() function.

The image format will be GIF87a unless the image has been made transparent with imagecolortransparent(), in which case the image format will be GIF89a.

The filename argument is optional, and if left off, the raw image stream will be output directly. By sending an image/gif content-type using header(), you can create a PHP script that outputs GIF images directly.

Замечание: Since all GIF support was removed from the GD library in version 1.6, this function is not available if you are using that version of the GD library. Support is expected to return in a version subsequent to the rerelease of GIF support in the GD library in mid 2004. For more information, see the GD Project site.

The following code snippet allows you to write more portable PHP applications by auto-detecting the type of GD support which is available. Replace the sequence header ("Content-type: image/gif"); imagegif ($im); by the more flexible sequence:

<?php
if (function_exists("imagegif")) {
    
header("Content-type: image/gif");
    
imagegif($im);
} elseif (
function_exists("imagejpeg")) {
    
header("Content-type: image/jpeg");
    
imagejpeg($im, "", 0.5);
} elseif (
function_exists("imagepng")) {
    
header("Content-type: image/png");
    
imagepng($im);
} elseif (
function_exists("imagewbmp")) {
    
header("Content-type: image/vnd.wap.wbmp");
    
imagewbmp($im);
} else {
    die(
"No image support in this PHP server");
}
?>

Замечание: As of version 3.0.18 and 4.0.2 you can use the function imagetypes() in place of function_exists() for checking the presence of the various supported image formats:

<?php
if (imagetypes() & IMG_GIF) {
    
header ("Content-type: image/gif");
    
imagegif ($im);
} elseif (
imagetypes() & IMG_JPG) {
    
/* ... etc. */
}
?>

See also imagepng(), imagewbmp(), imagejpeg() and imagetypes().



Если Вы не нашли что искали, то рекомендую воспользоваться поиском по сайту:
 





Copyright © 2005-2016 Project.Net.Ru