PHP.nl

imagecreatefromxpm

imagecreatefromxpm

gd.image.new

 **imagecreatefromxpm** string $filename
returns an image identifier

representing the image obtained from the given filename. imagecreatefromxpm

filenamePath to the XPM image.

gd.return.identifier

**Voorbeeld: Creating an image instance using **

<?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($xpm, './example.jpg', 100);
?>