Support of BMP in gd2

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jasongr
Forum Contributor
Posts: 206
Joined: Tue Jul 27, 2004 6:19 am

Support of BMP in gd2

Post by jasongr »

Hello people

does anyone know if gd2 supports the BMP windows format?
I am trying to find functions similar to:
* imagepng
* imagecreatefrompng

for manipulation of BMP files

regards
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

As far as I can tell from http://php.net/gd there is no support for image creation of BMP. There is however wbmp (wireless bitamps) functions that are used for black/white low rescource handhelds and such.
jasongr
Forum Contributor
Posts: 206
Joined: Tue Jul 27, 2004 6:19 am

Post by jasongr »

thanks
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Actually speaking gd developers could have supported bmp formats but I guess they targeted for web-specific images mainly ? Outputting BMP is not that tough to implement - they are just uncompressed pixels with the colour code at each location. Theres just 2 headers which you'll need to read properly.
I dont know wheres the original format location - but heres where you can start : http://www.dcs.ed.ac.uk/home/mxr/gfx/2d/BMP.txt
Search wotsit for any format
Post Reply