For those who use PHP QR Code to generate realtime QR Code's for each page on their website:
QR Codes get generated with a white background. For PNG's you can actually make them transparent with a minor modification.
Open the file "qrimage.php" and find this code at the end of the file:
$target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint);
ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH);
ImageDestroy($base_image);
return $target_image;
}
}
Now we only have to insert this line between the ImageCopyResized and ImageDestroy line:
ImageColorTransparent($target_image, $col[0]);
So that the code looks like this:
$target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint);
ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH);
ImageColorTransparent($target_image, $col[0]);
ImageDestroy($base_image);
return $target_image;
}
}
Now every PNG QR Code that gets generated will use transparent, instead of white, as a background color.