I had been running into a problem where the QR Codes were being read by a .Net application to be used for generating a PDF. It kept dying on importing the PNG file generated by phpQrCode and it turns out that the palette-based PNG phpQrCode generates was 1-bit (2 colors, black and white).
While the palette-based PNG is much more compact and efficient and still renders fine in other places, this particular control (or whatever it's called in .Net) wasn't having anything to do with it, generating a NullPointerException when reading the PNG image.
Sizes (based upon a QR encoding of a 50 character URL):
- Palette-Based (1-bit): 700 bytes
- TrueColor (24-bit): 2500 bytes
Quite a bit of difference in size, but sometimes it has to work for all uses.
This patch file just updates the one big file and the qrimage.php class to use ImageCreateTrueColor instead of ImageCreate.
I haven't tried this when generating JPG or EPS (that the other patch adds) but imagine that it should be fine with JPG at a minimum.
BTW: the .net control: PDFSharp 1.31 (can be found here on sourceforge)
patch file to update to ImageCreateTrueColor
B&W was selected to output possible small PNG image,
for future releases i plan to add more configuration to image output,
for now this patch is good idea when someone needs non-paleted, RGB images.
Thanks!