Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Image Functions : imagecreatefromwbmp

imagecreatefromwbmp

Create a new image from file or URL (PHP 4 >= 4.0.1, PHP 5)
resource imagecreatefromwbmp ( string filename )

Example 1004. Example to handle an error during creation

<?php
function LoadWBMP($imgname)
{
   
$im = @imagecreatefromwbmp($imgname); /* Attempt to open */
   
if (!$im) { /* See if it failed */
       
$im  = imagecreatetruecolor (20, 20); /* Create a blank image */
       
$bgc = imagecolorallocate($im, 255, 255, 255);
       
$tc  = imagecolorallocate($im, 0, 0, 0);
       
imagefilledrectangle($im, 0, 0, 10, 10, $bgc);
       
/* Output an errmsg */
       
imagestring($im, 1, 5, 5, "Error loading $imgname", $tc);
   }
   return
$im;
}
?>

Code Examples / Notes » imagecreatefromwbmp

clambert

WBMP images are Wireless Bitmaps, not Windows Bitmaps. WBMP is used for bandwidth constrained, black and white, limited devices such as PDAs and Cell Phones.

nko38 dot fr

for .bmp files, convert them with bmp2png, then you can use this files in gd
http://hp.vector.co.jp/authors/VA010446/b2p-home/


Change Language


Follow Navioo On Twitter
gd_info
getimagesize
image_type_to_extension
image_type_to_mime_type
image2wbmp
imagealphablending
imageantialias
imagearc
imagechar
imagecharup
imagecolorallocate
imagecolorallocatealpha
imagecolorat
imagecolorclosest
imagecolorclosestalpha
imagecolorclosesthwb
imagecolordeallocate
imagecolorexact
imagecolorexactalpha
imagecolormatch
imagecolorresolve
imagecolorresolvealpha
imagecolorset
imagecolorsforindex
imagecolorstotal
imagecolortransparent
imageconvolution
imagecopy
imagecopymerge
imagecopymergegray
imagecopyresampled
imagecopyresized
imagecreate
imagecreatefromgd2
imagecreatefromgd2part
imagecreatefromgd
imagecreatefromgif
imagecreatefromjpeg
imagecreatefrompng
imagecreatefromstring
imagecreatefromwbmp
imagecreatefromxbm
imagecreatefromxpm
imagecreatetruecolor
imagedashedline
imagedestroy
imageellipse
imagefill
imagefilledarc
imagefilledellipse
imagefilledpolygon
imagefilledrectangle
imagefilltoborder
imagefilter
imagefontheight
imagefontwidth
imageftbbox
imagefttext
imagegammacorrect
imagegd2
imagegd
imagegif
imagegrabscreen
imagegrabwindow
imageinterlace
imageistruecolor
imagejpeg
imagelayereffect
imageline
imageloadfont
imagepalettecopy
imagepng
imagepolygon
imagepsbbox
imagepsencodefont
imagepsextendfont
imagepsfreefont
imagepsloadfont
imagepsslantfont
imagepstext
imagerectangle
imagerotate
imagesavealpha
imagesetbrush
imagesetpixel
imagesetstyle
imagesetthickness
imagesettile
imagestring
imagestringup
imagesx
imagesy
imagetruecolortopalette
imagettfbbox
imagettftext
imagetypes
imagewbmp
imagexbm
iptcembed
iptcparse
jpeg2wbmp
png2wbmp
eXTReMe Tracker