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

search for in the

imagecreatetruecolor> <imagecreatefromxbm
Last updated: Fri, 20 Nov 2009

view this page in

imagecreatefromxpm

(PHP 4 >= 4.0.1, PHP 5)

imagecreatefromxpmCreate a new image from file or URL

Opis

resource imagecreatefromxpm ( string $filename )

imagecreatefromxpm() returns an image identifier representing the image obtained from the given filename.

Wskazówka

Jeśli włączona jest dyrektywa konfiguracyjna fopen wrappers, możliwe jest podanie jako nazwy pliku adresu URL. Zobacz opis funkcji fopen() aby dowiedzieć się jak przekazać nazwę pliku, oraz fopen wrappers aby uzyskać listę obsługiwanych protokołów.

Parametry

filename

Path to the XPM image.

Zwracane wartości

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

Przykłady

Przykład #1 Creating an image instance using imagecreatefromxpm()

<?php
// Check for XPM support
if(!(imagetypes() & IMG_XPM))
{
    die(
'Support for xpm was not found!');
}

// Create the image instance
$xpm imagecreatefromxpm('./example.xpm');

// Do image operations here

// PHP has no support for writing xpm images
// so in this case we save the image as a 
// jpeg file with 100% quality
imagejpeg($im'./example.jpg'100);
imagedestroy($im);
?>

Zwracane wartości

Informacja: Ta funkcja jest dostępna tylko jeśli PHP zostało skompilowane z dołączoną wersją biblioteki GD.

Informacja: Ta funkcja nie jest dostępna na platformie Windows.



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

imagecreatetruecolor> <imagecreatefromxbm
Last updated: Fri, 20 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites