A walkthrough of building a QR code generator entirely in Ruby using the rqrcode gem for encoding and ruby-libgd for image rendering. The resulting QRCodeGenerator class supports PNG, JPEG, WebP, and GIF output, with options for rounded modules, gradient backgrounds (vertical, horizontal, radial), logo embedding, alpha blending, and antialiasing. Usage examples cover standalone scripts and Rails controller integration for HTTP streaming. The motivation was avoiding third-party QR services that introduce hidden redirects and security concerns.

Sort: