PHP
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, 19 Jun 2009

view this page in

imagecreatefromxpm

(PHP 4 >= 4.0.1, PHP 5)

imagecreatefromxpmCreate a new image from file or URL

Descripción

resource imagecreatefromxpm ( string $filename )

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

Tip

Puede usar una URL como nombre de archivo con esta función si los fopen wrappers han sido activados. Consulte fopen() para más detalles sobre cómo especificar el nombre de fichero y Lista de Protocolos/Envolturas Soportadas una lista de protocolos URL soportados

Lista de parámetros

filename

Path to the XPM image.

Valores retornados

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

Ejemplos

Example #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);
?>

Valores retornados

Note: Esta funcion esta disponible solamente si PHP se ha compilado con la version de las bibliotecas GD distribuidas con PHP.

Note: Esta función no está implementada en plataformas 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, 19 Jun 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites