imagecreatefromxpm
(PHP 4 >= 4.0.1, PHP 5)
imagecreatefromxpm — Create a new image from file or URL
설명
resource imagecreatefromxpm
( string $filename
)
imagecreatefromxpm() returns an image identifier representing the image obtained from the given filename.
Tip
fopen 래퍼를 활성화하면, 파일명으로 URL을 사용할 수 있습니다. 파일 이름을 지정하는 방법은 fopen()을, 지원하는 URL 프로토콜 목록은 지원 프로토콜/래퍼 목록를 참고하십시오.
인수
- filename
-
Path to the XPM image.
반환값
Returns an image resource identifier on success, FALSE on errors.
예제
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);
?>
반환값
Note: 이 함수는 PHP에 포함된 GD 라이브러리를 사용하여 컴파일하였을 경우에만 사용할 수 있습니다.
Note: 이 함수는 윈도우 플랫폼에서는 작동하지 않습니다.
imagecreatefromxpm
There are no user contributed notes for this page.
