Blog

Luis Majano

October 14, 2026

Spread the word


Share your thoughts

The bx-image module can now generate and read QR codes. Two new functions, a string member function, and two new bx:image actions. No extra dependencies for you to manage.

Here is what it looks like.

qr = ImageQRCodeGenerate( "https://boxlang.io", 250 )
ImageWrite( qr, "/path/to/qr.png" )

A QR code for https://boxlang.io

The result is a regular BoxLang image. Resize it, add a border, write it as Base64, or drop it in a template. Every image function you already know works on it.

Make it yours

Pick the size, format, colors, and how much damage the code can survive and still scan.

qr = ImageQRCodeGenerate(
    text            = "https://boxlang.io",
    size            = 250,
    errorCorrection = "H",
    foreground      = "#1a237e",
    background      = "#ffeb3b"
)

A navy on yellow QR code

You can also drop a logo in the center. A logo hides part of the code, so BoxLang raises the error correction to H for you and then scans the result. If the logo makes the code unreadable, you get a clear error instead of a code that quietly fails in someone's hand.

qr = ImageQRCodeGenerate( text="https://example.com/with-logo", size=400, logo="/path/to/logo.png" )

A QR code with a logo in the center

A member function, too

qr = "https://boxlang.io".toQRCode( 250 )

Read them back

img = ImageRead( "/path/to/qr.png" )
text = ImageQRCodeRead( img )

// or as a member function
text = img.readQRCode()

If there is no QR code in the image, you get an empty string back. Light-on-dark codes are read too.

In templates

The bx:image component gets two new actions, matching how captcha works.

<bx:image action="qrcode" text="https://boxlang.io" size="250" name="qr" />
<bx:image action="qrread" source="/path/to/qr.png" name="decoded" />

With no name or destination, qrcode streams the image straight to the browser, just like captcha.

Get it

install bx-image

Already installed? Update the module to pick up the new functions.

Full reference for ImageQRCodeGenerate and ImageQRCodeRead is in the BoxLang docs. Found something odd or want another option? Open an issue.

Add Your Comment

Recent Entries

BoxLang AI 3.7: Profiles, Embeddings Defaults and MCP Rate Limiting

BoxLang AI 3.7: Profiles, Embeddings Defaults and MCP Rate Limiting

Ortus Solutions announces the release of BoxLang AI 3.7. Name a provider, model, params and API key once, then pick it by name for a call, an agent, or a single agent run. Embeddings get their own defaults, MCP servers you build get rate limiting and trusted proxies, and a handful of important fixes land along the way.

Luis Majano
Luis Majano
November 05, 2026
BoxLang  1.19.0: See Everything Your Code Does

BoxLang 1.19.0: See Everything Your Code Does

Ortus Solutions today announces the release of BoxLang 1.19.0, the software productivity platform for building, modernizing and running applications, with developers and AI agents working together. This release is about observability: built-in code coverage and execution profiling, the missing post-invocation events for BIFs, and new query and transaction events, and it pairs with the new BxLens beta, the debug bar and ops console that exposes hotspots and bytecode profilers. It also adds your own global settings in boxlang.json, static method interception, raw binary HTTP streaming and a lot of hardening across JDBC, Java interop and CFML compatibility.

Luis Majano
Luis Majano
November 05, 2026
Build AI Agents with Less Configuration: Join Luis Majano in Málaga

Build AI Agents with Less Configuration: Join Luis Majano in Málaga

Learn how to define, build, and run AI agents with BxAgents in a hands-on session organized by Malaga-AI and sponsored by Ortus Solutions! 🚀

Building an AI agent means connecting instructions, models, tools, and application logic. A clear project structure makes those pieces easier to organize and develop.

Maria Jose Herrera
Maria Jose Herrera
November 04, 2026