MCPcopy Index your code
hub / github.com/makiuchi-d/gozxing

github.com/makiuchi-d/gozxing @v0.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.1 ↗ · + Follow
1,800 symbols 8,127 edges 251 files 189 documented · 10% 2 cross-repo links updated 11mo ago★ 6616 open issues

Browse by type

Functions 1,648 Types & classes 152
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

gozxing A Barcode Scanning/Encoding Library for Go

Build Status codecov

ZXing is an open-source, multi-format 1D/2D barcode image processing library for Java. This project is a port of ZXing core library to pure Go.

Porting Status (supported formats)

2D barcodes

Format Scanning Encoding
QR Code :heavy_check_mark: :heavy_check_mark:
Data Matrix :heavy_check_mark: :heavy_check_mark:
Aztec :heavy_check_mark:
PDF 417
MaxiCode

1D product barcodes

Format Scanning Encoding
UPC-A :heavy_check_mark: :heavy_check_mark:
UPC-E :heavy_check_mark: :heavy_check_mark:
EAN-8 :heavy_check_mark: :heavy_check_mark:
EAN-13 :heavy_check_mark: :heavy_check_mark:

1D industrial barcode

Format Scanning Encoding
Code 39 :heavy_check_mark: :heavy_check_mark:
Code 93 :heavy_check_mark: :heavy_check_mark:
Code 128 :heavy_check_mark: :heavy_check_mark:
Codabar :heavy_check_mark: :heavy_check_mark:
ITF :heavy_check_mark: :heavy_check_mark:
RSS-14 :heavy_check_mark: -
RSS-Expanded

Special reader/writer

Reader/Writer Porting status
MultiFormatReader
MultiFormatWriter
ByQuadrantReader
GenericMultipleBarcodeReader
QRCodeMultiReader :heavy_check_mark:
MultiFormatUPCEANReader :heavy_check_mark:
MultiFormatOneDReader

Usage Examples

Scanning QR code

package main

import (
    "fmt"
    "image"
    _ "image/jpeg"
    "os"

    "github.com/makiuchi-d/gozxing"
    "github.com/makiuchi-d/gozxing/qrcode"
)

func main() {
    // open and decode image file
    file, _ := os.Open("qrcode.jpg")
    img, _, _ := image.Decode(file)

    // prepare BinaryBitmap
    bmp, _ := gozxing.NewBinaryBitmapFromImage(img)

    // decode image
    qrReader := qrcode.NewQRCodeReader()
    result, _ := qrReader.Decode(bmp, nil)

    fmt.Println(result)
}

Generating CODE128 barcode

package main

import (
    "image/png"
    "os"

    "github.com/makiuchi-d/gozxing"
    "github.com/makiuchi-d/gozxing/oned"
)

func main() {
    // Generate a barcode image (*BitMatrix)
    enc := oned.NewCode128Writer()
    img, _ := enc.Encode("Hello, Gophers!", gozxing.BarcodeFormat_CODE_128, 250, 50, nil)

    file, _ := os.Create("barcode.png")
    defer file.Close()

    // *BitMatrix implements the image.Image interface,
    // so it is able to be passed to png.Encode directly.
    _ = png.Encode(file, img)
}

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 1,010
Method 638
Struct 122
Interface 18
TypeAlias 11
FuncType 1

Languages

Go100%

Modules by API surface

aztec/detector/detector.go29 symbols
bit_matrix.go26 symbols
bit_array.go24 symbols
qrcode/encoder/encoder.go23 symbols
qrcode/detector/finder_pattern_finder.go23 symbols
luminance_source.go22 symbols
datamatrix/encoder/encoder_context.go22 symbols
datamatrix/encoder/symbol_info.go21 symbols
common/decoder_result.go21 symbols
qrcode/decoder/version.go20 symbols
inverted_luminance_source_test.go20 symbols
bit_matrix_test.go20 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add gozxing \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page