🌐 Website · 📚 Documentation
The pure-Go, CGO=0 2D graphics foundation — the shared substrate that sits
below the fleet's image-processing and rendering libraries. The Go answer to
what Skia, Cairo and image/draw provide elsewhere: pixel buffers, colour
science, high-quality resampling, image codecs and a vector rasterizer, each
usable on its own, with no third-party dependencies.
go-gfx is not an image-processing library (that is go-images, the scikit-image analogue) and not a widget toolkit (that is go-widgets). It is the common layer both stand on, so colour blending, resampling, codecs and path rasterization are written and tested once and shared across the whole ecosystem.
| Repo | What it is |
|---|---|
| gfx | the library: geometry · color · raster · resample · codec · vector in one CGO=0 module |
| qr | a QR Code encoder (ISO/IEC 18004) that returns a module matrix, not a picture: the caller paints it as a widget, an SVG or a bitmap. The encoder imports nothing outside the standard library; an optional Image/PNG helper uses only image and image/png |
| docs | MkDocs Material documentation, served at /docs/ |
| go-gfx.github.io | the Hugo landing page |
| brand | brand assets — logos & icons |
| Package | Purpose |
|---|---|
geometry |
points, rectangles, affine transforms |
color |
RGB/XYZ/Lab, sRGB↔linear, premultiplied alpha, blend modes |
raster |
shared pixel-buffer / pixel-format substrate |
resample |
box/area, bicubic (Catmull-Rom), Lanczos resizing |
codec |
PNG, JPEG, WebP, ICO, ICNS, GIF, TIFF decoders/encoders |
vector |
paths, anti-aliased rasterizer, strokes, gradients |
- go-images — image processing, on
raster/color/resample. - go-widgets/painter — tri-backend renderer, on
vector/raster/color. - go-webengine — HTML/CSS → image, on
resample/codec/vector. - go-widgets/desktop — icon & thumbnail rendering.
- Pure Go,
CGO_ENABLED=0. No Skia, no Cairo, no native shims. - Zero third-party dependencies. Nothing fleet-side except
go-asmgen for optional SIMD, pulled in only at
code-generation time so the library keeps a zero-dependency
go.mod. - 100% test coverage, including error branches, gated in CI.
- Six architectures. Build + test on all six of Go's 64-bit targets — amd64 / arm64 natively, loong64 / riscv64 / ppc64le / s390x under qemu.
- BSD-3-Clause on every source file.
Bootstrapping. The module skeleton is up; packages land incrementally, starting
with resample, raster and color. See the
roadmap.
