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

ACF2021 extended support ends on November 10. Is Your Application Ready?

ACF2021 extended support ends on November 10. Is Your Application Ready?

Adobe ColdFusion 2021 reaches the end of extended support on November 10, 2026. If your application still runs on this release, the time to decide what comes next is now.

Adobe ended core support for ColdFusion 2021 on November 10, 2025. The current extended support period is best effort and does not include security patches or hotfixes. When it ends on November 10 2026, organizations will no longer have that support option from Adobe for ColdFusion 2021.

What ...

Cristobal Escobar
Cristobal Escobar
October 13, 2026
TestBox 7.2 Real Browser Testing, Smarter Reports, and Agent-Ready Results

TestBox 7.2 Real Browser Testing, Smarter Reports, and Agent-Ready Results

Ortus Solutions today announces the general availability of TestBox 7.2, the biggest TestBox release in years. Built on the new bx-playwright 1.0 module, BoxLang specs can now drive a real browser, assert with web-first matchers that wait until they pass, and keep the screenshots, traces and videos of every failure. Around it, TestBox gains spec retries, a Run Failed option, a rebuilt set of HTML reporters with Ask AI on every failure, and a new Agent reporter that lets AI agents read a test run at minimal token cost.

Luis Majano
Luis Majano
October 13, 2026