>> v = 0x0bcd
>> b = v & 0xf
>> v >>= 4
>> g = v & 0xf
>> v >>= 4
>> r = v & 0xf
>> print r, g, b
>>
>>
> Alternatively, using 5-bit colors you would use
>
> b = v & 0x1f
> g = (v >> 5) & 0x1f
> r = (v >> 10) & 0x1f
Darn. I knew I missed _something_...
Diez
--
http://mail.python.org/mailman/l
Diez B. Roggisch wrote:
> beertje wrote:
>
>> This has me a bit stumped...
>>
>> I'm trying to extract pictures from a file. So far I'm successfully
>> retrieved the header and what I think is the colour for each pixel.
>> Here's the description:
>>
>> """
>> 3) The picture data format:
>> The col
Diez B. Roggisch wrote:
> beertje wrote:
>
>> This has me a bit stumped...
>>
>> I'm trying to extract pictures from a file. So far I'm successfully
>> retrieved the header and what I think is the colour for each pixel.
>> Here's the description:
>>
>> """
>> 3) The picture data format:
>> The col
beertje wrote:
> This has me a bit stumped...
>
> I'm trying to extract pictures from a file. So far I'm successfully
> retrieved the header and what I think is the colour for each pixel.
> Here's the description:
>
> """
> 3) The picture data format:
> The color information is 15 bit data store
On Jul 25, 9:53 pm, beertje <[EMAIL PROTECTED]> wrote:
> This has me a bit stumped...
>
> I'm trying to extract pictures from a file. So far I'm successfully
> retrieved the header and what I think is the colour for each pixel.
> Here's the description:
>
> """
> 3) The picture data format:
> The c
This has me a bit stumped...
I'm trying to extract pictures from a file. So far I'm successfully
retrieved the header and what I think is the colour for each pixel.
Here's the description:
"""
3) The picture data format:
The color information is 15 bit data stored in 16 bit. This means the
most
s