[Haskell-cafe] creating graphics the functional way

Frank Buss fb at frank-buss.de
Mon Aug 6 23:15:53 EDT 2007

Marc A. Ziegert wrote: 

> in that source file, you define Size and Pixel as structs of 
> "Integer"s. that are neither unsigned chars (8_bit) nor ints 
> (32-64_bit) nor floats (32_bit) but an artificial oo_bit int 
> (1 int + list of bytes).
> i'm sure you will gain a speedup by redefining these structs. 
> i.e. use Float or Int instead of Integer; see Data.Int and 
> Data.Word for more alternatives.

I've tried it, but it was not faster. Using Word8 for the RGB pixels even
resulted in wrong colors with the anti-aliased version, maybe because of
number overflows.

Frank Buss, fb at frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de

More information about the Haskell-Cafe mailing list