Skip to content

earhart/qrdraw

Repository files navigation

QRDraw - Interactive QArt QR Code Editor

An interactive desktop application for creating QArt QR codes - QR codes with embedded visual patterns where you can control individual pixels.

(Also, a little experiment in vibe-coding--this was generated in about an hour, chatting w/Claude. :-)

Features

  • Interactive Pixel Grid: Click or drag to paint pixels

    • Paint Modes: Paint Black, Paint White, or Erase (unlock)
    • Click: Paint single pixel
    • Click & Drag: Paint multiple pixels (brush mode)
  • Visual Feedback:

    • Gray pixels: Fixed structural elements (finder patterns, timing, format info)
    • Black/White pixels: Controllable data pixels
    • Blue pixels: User-locked black pixels
    • Light blue pixels: User-locked white pixels
    • Yellow highlight: Hover to see pixel information
  • Content Schemes:

    • URL: https://example.com
    • Email: mailto:user@example.com
    • Phone: tel:+1234567890
    • WiFi: NetworkName,password,WPA
    • SMS: +1234567890,Hello
    • Plain Text: Any text content
  • QR Configuration:

    • Auto-selected version based on content length
    • Error correction levels: L (7%), M (15%), Q (25%), H (30%)
    • Real-time statistics showing controllable pixels, locked pixels, and degrees of freedom
  • Optimization: Try all 8 QR mask patterns to minimize conflicts with locked pixels

  • Error Tracking: See how many locked pixels match naturally vs. using error correction

  • Export: Save QR codes as PNG images (Ctrl+S or use Save button)

Usage

go run .

Controls

  • Click on a pixel to lock/unlock it
  • Hover over pixels to see their properties
  • Reset Locks button to clear all locked pixels
  • Save QR Code button (or Ctrl+S) to export as PNG

Content Entry

  1. Select a scheme from the radio buttons
  2. Enter your content in the text field
  3. The QR code updates automatically
  4. Click pixels in the grid to create your desired pattern

WiFi QR Codes

For WiFi networks, use the format:

NetworkName,password,WPA

Authentication types: WPA, WEP, or nopass (for open networks)

SMS QR Codes

For SMS with pre-filled message:

+1234567890,Your message here

Architecture

  • Go + GioUI: Immediate mode GUI for responsive pixel editing
  • rsc.io/qr: Robust QR code generation library
  • Constraint Solving: Tracks which pixels can be controlled vs. fixed structure

How It Works

QR codes have structural elements (finder patterns, timing, format info) that cannot be changed. The remaining "data" pixels can be controlled to create patterns while maintaining scannability. This application:

  1. Generates a valid QR code for your content
  2. Identifies which pixels are part of the fixed structure
  3. Allows you to lock controllable pixels to specific values
  4. Updates statistics showing how many degrees of freedom remain

The error correction mechanism allows some pixels to be set to arbitrary values while maintaining the ability to decode the QR code.

Future Enhancements

  • Image import to auto-generate pixel patterns
  • Undo/redo support
  • Pattern templates
  • Batch generation
  • Advanced constraint visualization

License

MIT

About

A simple QR-code editor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages