"Harold Hausman" <hhausman / gmail.com> writes:

> Ha! I did the exact same thing the day they announced that PNG lib.
> There is some kind of bug in their implementation of that tricksy line
> drawing algorithm they're using. I spent about 20 minutes trying to
> unravel it and then quit.
>
> I found it kind of ironic that they chose some super speedy line
> drawing routine meant to save cycles when writing directly to video
> ram in mode 13h from the early ninety's. Sitting right next to a pure
> ruby implementation of png, compression and all, the contrast was
> stark.

To be fair, they don't do the compression in pure ruby - they call
Zlib, so the really computationally intensive bit isn't in ruby.

Also, the fast line-drawing algorithm used for writing to that old
320x200 VGA mode wasn't what they're using here.  Here, they're doing
*anti-aliased* lines, which no one would ever think of trying when you
only have 256 colors available and the pixels are going to be visibly
squares no matter what you do.

That old line drawing algorithm I could just pull out of a book on my
shelf; what they're doing here is enough different that it's very
tough to disentangle.

-- 
s=%q(  Daniel Martin -- martin / snowplow.org
       puts "s=%q(#{s})",s.map{|i|i}[1]       )
       puts "s=%q(#{s})",s.map{|i|i}[1]