FS#2934 - Color BMP support

Attached to Project: Rockbox
Opened by Linus Nielsen Feltzing (linusnielsen) - Saturday, 21 January 2006, 02:09 GMT
Last edited by Linus Nielsen Feltzing (linusnielsen) - Saturday, 28 January 2006, 12:12 GMT
Task Type Patches
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Here is my first stab at color BMP support in Rockbox.

The read_bmp_file() function can now load both
monochrome and (24-bit) color BMP's. You can select
which format the BMP shall be stored in, either

The read_bmp_file() function populates a bitmap struct
with the width, height, data pointer and the format, so
the application can select the proper lcd_bitmap
function to draw it.

The WPS is updated to make use of this and can now show
both monochrome and color BMP's.

Known issues:

1) Only 24-bit color BMP's supported yet

2) The rwps crashes if it tries to display a color BMP.
This is because the rwps shares images with the wps,
but doesn't know the bit depth of the attached screen.

Check it out and give me comments.
This task depends upon

Closed by  Linus Nielsen Feltzing (linusnielsen)
Saturday, 28 January 2006, 12:12 GMT
Reason for closing:  Accepted
Comment by Anonymous Submitter - Saturday, 21 January 2006, 14:12 GMT

Linus, is there a hardcoded transparency color?
If not, we need one, cause the WPS just shows BG as white
and covers all the text.
Comment by Anonymous Submitter - Sunday, 22 January 2006, 18:28 GMT

just add pink (255,0,255) as a transparent color...
if somebody really want to use pink...than he/she should
use some color really close to pink (i.e: 254,0,255)
Comment by Benoit-Pierre Guay (benoitpguay) - Sunday, 22 January 2006, 21:24 GMT

Psyche sent a BMP transparency patch on Misticriver on the
"RockBox Build - H300 Optimized DISCUSSION THREAD - Page 16
- MisticRiver :: For iriver Enthusiasts" thread.
Comment by Anonymous Submitter - Wednesday, 25 January 2006, 21:13 GMT

Your patch work very fine Linus.
Please commit it to CVS for users that can't compile.