🕷 software releases

by ryan davis



sitemap

png version 1.1.0 has been released!

Published 2007-03-26 @ 14:29

PNG is an almost-pure-ruby PNG library. It lets you write a PNG without any C libraries.

FEATURES

  • Very simple interface.
  • Outputs simple PNG files with ease.
  • Basic PNG reader as well (someday it might do compositing and the like!).
  • Almost pure ruby, does require a compiler.

SYNOPSYS

  require 'png'
  
  canvas = PNG::Canvas.new 200, 200
  
  # Set a point to a color
  canvas[100, 100] = PNG::Color::Black
  
  # draw an anti-aliased line
  canvas.line 50, 50, 100, 50, PNG::Color::Blue
  
  png = PNG.new canvas
  png.save 'blah.png'

Changes:

1.1.0 / 2007-03-26

  • 4 major enhancements:
    • Fixed and incorporated Dominik Barathon’s optimizations.
    • Wrote inline methods for png_crc and png_join. Now about 15x faster overall.
    • Basic PNG loading.
    • Reoriented x/y origin to bottom left. This will break things!
  • 3 minor enhancements:
    • Awesome ascii art patches from Tom Werner: Canvas#inpsect, Canvas#to_s, Color#to_ascii.
    • Switched to Hoe.
    • PNG.pie_chart from png/pie.
  • 1 bug fix:
    • Fixed bug in PNG::Canvas#each.