Re: [AD] Color convertors

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


In reply to Bob <ohannessian@xxxxxxxxxx>:
>> assuming c is right aligned unsigned
>> 6bits to 8bit is:
>> 
>> c = (c<<2) | (c>>4)
>> 
>> 5bits to 8bit is:
>> 
>> c = (c<<3) | (c>>2)
>> 
>> these properly scale the value
>
>And that tripples the work done.

What about a lookup table?

Bye for now,
-- 
Laurence Withers, lwithers@xxxxxxxxxx
                http://www.lwithers.demon.co.uk/

Attachment: signature.asc
Description: PGP signature



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/