[ale] OO Perl

Joe Knapka jknapka at kneuro.net
Mon Apr 19 03:57:09 EDT 2004


Fletch <fletch at phydeaux.org> writes:

> >>>>> "Michael" == Michael D Hirsch <mhirsch at nubridges.com> writes:
> 
> [...]
> 
>     Michael> Wow.  I've never seen pretty-printed line noise before!
>     Michael> :-)
> 
> <Austrailian accent>
> That's not line noise . . .
> 
> 
> use GD;$f='#ffffff';$T=table;sub p{print at _}p"<body bgcolor=$f>";for(@ARGV){
> open*G,$_ or(warn("$_: $!")&&next);$g=GD::Image->newFromGif(G)||(warn$_,
> ": GD error"and next);@c=map{$_!=$g->transparent?sprintf'#'.('%.2x'x3),$g->
> rgb($_):$f}0..$g->colorsTotal;p"<$T border=0 cellpadding=0 cellspacing=0>";(
> $x,$y)=$g->getBounds;for$j(0..$y){p"<tr>";for($i=0;$i<$x;$i++){$s=1;$s++&&
> $i++while($i+1<$x&&$g->getPixel($i+1,$j)==$g->getPixel($i,$j));p"
> <td bgcolor=",$c[$g->getPixel($i,$j)]," colspan=$s>&nbsp"}}p"</$T>"}
> 
> 
> *That's* line noise.
> </mildly obscure 80's movie reference>

I keep trying to picture Steve Irwin in that role... It's
hurting my brain...

-- Joe

-- 
Resist the feed.
--
If you really want to get my attention, send mail to
jknapka .at. kneuro .dot. net.



More information about the Ale mailing list