(PHP 4 >= 4.0.1, PHP 5, PHP 7)
imagecreatefromxpm — 锟斤拷锟侥硷拷锟斤拷 URL 锟斤拷锟斤拷一锟斤拷锟斤拷图锟斤拷
$filename
) : resourceimagecreatefromxpm() 锟斤拷锟斤拷一图锟斤拷锟绞讹拷锟斤拷锟斤拷锟斤拷锟斤拷舜痈锟斤拷锟斤拷锟斤拷募锟斤拷锟饺★拷玫锟酵硷拷锟�
Note: 锟剿猴拷锟斤拷锟斤拷锟斤拷锟斤拷 GD 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 PHP 锟芥本锟叫匡拷锟矫★拷
锟斤拷锟斤拷锟斤拷锟斤拷fopen 锟斤拷装锟斤拷锟斤拷锟节此猴拷锟斤拷锟叫o拷 URL 锟斤拷锟斤拷为锟侥硷拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街革拷锟斤拷募锟斤拷锟斤拷锟斤拷 fopen()锟斤拷锟斤拷锟斤拷 wapper 锟侥诧拷同锟斤拷锟斤拷锟斤拷渭锟� 支锟街碉拷协锟斤拷头锟阶靶拷锟�锟斤拷注锟斤拷锟斤拷锟矫凤拷锟斤拷锟斤拷锟斤拷峁╋拷锟皆わ拷锟斤拷锟斤拷锟斤拷锟斤拷
Note: 锟剿猴拷锟斤拷未锟斤拷 Windows 平台锟斤拷实锟街★拷
filename
Path to the XPM image.
锟缴癸拷锟襟返伙拷图锟斤拷锟斤拷源,失锟杰后返伙拷 FALSE
锟斤拷
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($xpm, './example.jpg', 100);
imagedestroy($xpm);
?>
Note: 锟剿猴拷锟斤拷锟斤拷锟斤拷锟斤拷 GD 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 PHP 锟芥本锟叫匡拷锟矫★拷
Note: 锟剿猴拷锟斤拷未锟斤拷 Windows 平台锟斤拷实锟街★拷