Class | PNG |
In: |
lib/PatchedPNG.rb
|
Parent: | Object |
A pure Ruby Portable Network Graphics (PNG) writer.
www.libpng.org/pub/png/spec/1.2/
PNG supports: + 8 bit truecolor PNGs
PNG does not support: + any other color depth + extra data chunks + filters
require 'png' canvas = PNG::Canvas.new 200, 200 canvas[100, 100] = PNG::Color::Black canvas.line 50, 50, 100, 50, PNG::Color::Blue png = PNG.new canvas png.save 'blah.png'