imagecreatefrombmp

(PHP 7 >= 7.2.0)

imagecreatefrombmp锟斤拷锟侥硷拷锟斤拷 URL 锟斤拷锟斤拷一锟斤拷锟斤拷图锟斤拷

说锟斤拷

imagecreatefrombmp ( string $filename ) : resource

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

Tip

锟斤拷锟斤拷锟斤拷锟斤拷fopen 锟斤拷装锟斤拷锟斤拷锟节此猴拷锟斤拷锟叫o拷 URL 锟斤拷锟斤拷为锟侥硷拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街革拷锟斤拷募锟斤拷锟斤拷锟斤拷 fopen()锟斤拷锟斤拷锟斤拷 wapper 锟侥诧拷同锟斤拷锟斤拷锟斤拷渭锟� 支锟街碉拷协锟斤拷头锟阶靶拷锟�锟斤拷注锟斤拷锟斤拷锟矫凤拷锟斤拷锟斤拷锟斤拷峁╋拷锟皆わ拷锟斤拷锟斤拷锟斤拷锟斤拷

锟斤拷锟斤拷

filename

Path to the BMP image.

锟斤拷锟斤拷值

锟缴癸拷锟襟返伙拷图锟斤拷锟斤拷源,失锟杰后返伙拷 FALSE 锟斤拷

锟斤拷锟斤拷

Example #1 Convert an BMP image to a PNG image using imagecreatefrombmp()

<?php
// Load the BMP file
$im imagecreatefrombmp('./example.bmp');

// Convert it to a PNG file with default settings
imagepng($im'./example.png');
imagedestroy($im);
?>