Convert Bitmap Files into JPEG using the GD library in PHP

Use this function:

http://www.programmierer-forum.de/function-imagecreatefrombmp-welche-variante-laeuft-t143137.htm

It supports several bitrates like 16- and 32-bit. Plus it contains some bugfixes regarding missing filesize, negative color palettes, error output, additional 16-bit mask header (this was the main problem on 16-bit) and reduced color palette (biClrUsed).

Hope you like it ;)

Update in 2015: This function is now part of DOMPDF (Search on page for "imagecreatefrombmp") and was brought to perfection. Now it covers compressed 4- and 8-bit, ignores unimportant headers and supports the special 16-bit 565 mask as well.

Tags:

Php

Gd

Bitmap

Jpeg