imagecreatefromxpm
(PHP 4 >= 4.0.1, PHP 5)
imagecreatefromxpm — Create a new image from file or URL
Descripción
imagecreatefromxpm() returns an image identifier representing the image obtained from the given filename.
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.
imagecreatefromxpm
