Show HN: Ruby-libgd – Native 2D graphics engine for Ruby (no CLI, no JavaScript)
3 points| ggerman2025 | 23 days ago
I built *ruby-libgd*, a native Ruby binding to the libgd graphics library.
The goal is to provide a lightweight, in-process 2D graphics engine for Ruby — not an image manipulation wrapper, but a canvas-based drawing API with deterministic rendering.
Unlike tools like MiniMagick (which wrap ImageMagick CLI), ruby-libgd runs entirely in-process and exposes explicit drawing primitives: lines, shapes, text, fonts, colors, and pixel-level control.
Simple example:
```ruby img = GD::Image.new(400, 300) white = GD::Color.rgb(255, 255, 255) black = GD::Color.rgb(0, 0, 0)
img.rectangle(20, 20, 200, 150, black) img.text("Hello Ruby", x: 30, y: 40, color: black)
img.save("output.png")
Borg3|23 days ago
This stuff is written in Ruby :)
ggerman2025|23 days ago
That link looks like a Ruby-level drawing demo (and I don’t see a public repo or docs behind it).
ruby-libgd is a native, in-process binding to libgd, focused on deterministic rendering and explicit pixel-level primitives, released under the MIT license.
On top of that, I built libgd-gis (also MIT) as a higher-level standard: map rendering, GeoJSON ingestion, layers, tiles, and reproducible output for GIS-style workloads.
ruby-libgd is the low-level graphics engine; libgd-gis is the map renderer built on it.