qr_code_generator icon indicating copy to clipboard operation
qr_code_generator copied to clipboard

On some machines the QR Code image appears to be all black.

Open scottwb opened this issue 15 years ago • 1 comments

Reported via email by River Ross on 7/13/2010:

Thank you for writing this plugin which makes qr images so easy to do on rails! Elegant, simple, and awesome!

I ran into a bug and thought I’d pass along the fix. On some machines the qr code appears as a solid black image. The reason is explained here:

http://rubyforge.org/forum/forum.php?thread_id=31218&forum_id=1618

solution:

WHITE_PIXEL = Magick::QuantumRange

(255 is white when image magick is 8-bit, but when its 16, 32, or 64-bit then 255 is nearly black)

scottwb avatar Jul 14 '10 21:07 scottwb

RMagick 1

WHITE_PIXEL = Magick::MaxRGB

tnedlacer avatar Jan 31 '12 11:01 tnedlacer