New Book: Perl Hacks

Andy Armstrong andy at hexten.net
Thu May 18 12:46:27 BST 2006


On 18 May 2006, at 12:30, Andy Armstrong wrote:
> "Couldn't open the file. It may be corrupt or a file format that  
> Preview doesn't recognise"
>
> OK on little endian machines.
>
> 1,3c1,3
> < 00000000  42 4d 00 00 93 36 00 00  00 00 00 00 00 36 00 00  |BM... 
> 6.......6..|
> < 00000010  00 28 00 00 00 70 00 00  00 70 00 18 00 01 00 00  |. 
> (...p...p......|
> < 00000020  00 00 00 00 93 00 00 00  00 00 00 00 00 00 00 00   
> |................|
> ---
> > 00000000  42 4d 36 93 00 00 00 00  00 00 36 00 00 00 28 00  | 
> BM6.......6...(.|
> > 00000010  00 00 70 00 00 00 70 00  00 00 01 00 18 00 00 00   
> |..p...p.........|
> > 00000020  00 00 00 93 00 00 00 00  00 00 00 00 00 00 00 00   
> |................|

Fixed :)

          s''openZF,"
        >o.bmp";printZF
       Zpack("a2V13",BM,
      37686,0,54,40,112,11
     2,1572865,0,37632),map
     {chr(($_%112-55)**2+($
     _/112-55)**2<3025?255-
     3*(($_/112-75)**2+($_%
      112-75)**2)**.5:0)x3
       }0..12544';s#\s##g
         ;s#Z# #g;eval


-- 
Andy Armstrong, hexten.net



More information about the london.pm mailing list