|
Hi HN, 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") |
This stuff is written in Ruby :)