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

Ortus Year-End Offers Are Open. Plan Your Next Move for 2027.

Ortus Year-End Offers Are Open. Plan Your Next Move for 2027.

Ortus Year-End Offers Are Open. Plan Your Next Move for 2027.

Get 20% off eligible Ortus services and BoxLang+ licenses, explore migration assistance for BoxLang+ and BxLens, and see ticket options for...

Maria Jose Herrera
Maria Jose Herrera
November 27, 2026
Plan Your Modernization Path for 2027 with Ortus Year-End Offers

Plan Your Modernization Path for 2027 with Ortus Year-End Offers

As you plan for 2027, think about what would give your team more room to build. Maybe there’s a ColdFusion or Lucee upgrade you’ve been putting off because too many workflows depend on it. Maybe release testing still takes hours, or your team is ready to bring a BoxLang application into production and wants better visibility into how it runs.

Maria Jose Herrera
Maria Jose Herrera
November 25, 2026
Into the Box 2027 Is Coming to Orlando. The Next Move Is Yours!

Into the Box 2027 Is Coming to Orlando. The Next Move Is Yours!

We’re taking Into the Box to Orlando! For the first time, our developer conference is heading to Orlando, Florida, and moving from spring to fall. Join us November 10–12, 2027 for a full day of hands-on workshops and two days of technical sessions with the BoxLang, CFML, and Java communities.

After celebrating 20 years of Ortus Solutions, we’re opening our next chapter with a new venue, a new conference website, and a theme that puts developers in charge of what happens next. Blind Tickets are open and start at $79.

Maria Jose Herrera
Maria Jose Herrera
November 25, 2026