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

search for in the

imagecreatefromgif> <imagecreatefromgd2part
Last updated: Fri, 10 Oct 2008

view this page in

imagecreatefromgd

(PHP 4 >= 4.0.7, PHP 5)

imagecreatefromgdCreate a new image from GD file or URL

Описание

resource imagecreatefromgd ( string $filename )

Create a new image from GD file or URL.

Подсказка

Для этой функции вы можете использовать URL в качестве имени файла, если была включена опция "fopen wrappers". Смотрите более подробную информацию об определении имени файла в описании функции fopen(), а также список поддерживаемых протоколов URL в List of Supported Protocols/Wrappers.

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

filename

Path to the GD file.

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

Returns an image resource identifier on success, FALSE on errors.

Примеры

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

<?php
// Load the gd image
$im = @imagecreatefromgd('./test.gd');

// Test if the image was loaded
if(!is_resource($im))
{
     die(
'Unable to load gd image!');
}

// Do image operations here

// Save the image
imagegd($im'./test_updated.gd');
imagedestroy($im);
?>

Примечания

Внимание

Версии PHP для Windows до PHP 4.3.0 не поддерживают возможность использования удаленных файлов этой функцией даже в том случае, если опция allow_url_fopen включена.



add a note add a note User Contributed Notes
imagecreatefromgd
There are no user contributed notes for this page.

imagecreatefromgif> <imagecreatefromgd2part
Last updated: Fri, 10 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites