Hello Guys,

This is my first post.

Our input file uses RGBW4444 bitmap (The W-color element is important
for our hardware device).

However, android (in bmpdecoderhelper.cpp), does not seem to read the
alpha value (we wanted to simulate the alpha value as White value).

Our solution is to use RGB565 for reading the pixel data. When the
pixel data is already on the Linux frame buffer, then our display
driver will read it as RGBW4444.

Our problem is the value copied to the frame buffer is different.
Based on our observation, the following is the output (frame buffer
value) for some color values:
F000 -> 0091
0F00 -> 000E
00F0 -> F800
000F -> 0760
0000 -> 0000
0101 -> 0100
0202 -> 0222
0303 -> 0322
...

Our observation is some of the bits were modified. We think the
"transformation" is as follows:
/* number is the position of the bits from MSB */
If Input Data:                0123456789ABCDEF
Value in framebuffer:  01230567856BCDEB
Modified bits:                       X        XX           X
Note: RGB565 and RGBW4444 has 16 bits.

It seems that the RGB565 data was reduced to RGB444 then returned to
RGB565 (losing the lower bits).

We are using Android version 2.1.
We modified bmpdecoderhelper.cpp, DecodeImage(),

+++++++++++++++++++++++++++
Overwrite value for bit mask:
redBits = 0xF800
greenBits = 0x07E0
blueBits = 0x001F
/* force to read as RGB565 */
+++++++++++++++++++++++++++

Does anyone has any idea where the reducing to 4 bits could possibly
happen?

I will update this post when there is new information.
Thank you very much.


Regards,
Ivan

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to