Any suggestions to speed this up

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Wed Nov 5 11:15:19 EST 2003


On Tue, 4 Nov 2003 17:16:07 -0500, rumours say that "Terry Reedy"
<tjreedy at udel.edu> might have written:

>> Virtually all the time is consumed expanding the 1 byte of grayscale
>> data into 3 bytes to get RGB.  For example, V=128 is converted to
>> R=128,G=128,B=128.
>
>I would look at PIL to see it it had a builtin function to do this and
>then Numerical Python.

I believe PIL Image.convert and Image.getdata provide all the necessary
functionality.
-- 
TZOTZIOY, I speak England very best,
Ils sont fous ces Redmontains! --Harddix




More information about the Python-list mailing list