Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: belly917 on November 17, 2005, 11:29:23 PM

Title: WPS Bitmaps - inverted
Post by: belly917 on November 17, 2005, 11:29:23 PM
Hey everybody,   I've tried searching the forums many times, and I was unable to find an answer to this question (although I did find this question asked elsewhere.. never answered)

I created a bitmap in photoshop to use in a WPS, and saved it as a 1 bit bitmap.  But when I cued up the WPS on my iriver, the bmp was inverted.. all the black was white & vice versa.  Now it was easy to fix, as I just inverted the colors in photoshop & resaved the bitmap.

My question is.. why is this happening?  When I look at other bitmap files that are included in the new daily builds, or on the wps gallery.. all the bitmaps appear proper in photo software on my computer, and also on the iriver.  Yet my bitmap has to be inverted.

Can anyone shed any light on this for me?  If you need to get your hands on my bitmap or wps code, I can post them here upon request, or you can check it out in the wiki wps gallery under PhillipBonnevie. (http://www.rockbox.org/twiki/bin/view/Main/WpsGallery#PhillipBonnevie)
Title: Re: WPS Bitmaps - inverted
Post by: ray on November 18, 2005, 01:41:59 AM
try opening your .bmp's in MS Paint... and see if there are any regularities.
also you could try saving it as a monochrome bitmap in MS Paint as well...

i can't think of anything else right now!

Title: Re: WPS Bitmaps - inverted
Post by: ENWOD on November 18, 2005, 12:32:52 PM
Was the invert screen thingamajig on? :-\
Title: Re: WPS Bitmaps - inverted
Post by: belly917 on November 18, 2005, 12:47:17 PM
No, the inverted screen setting is not on.

Well.. I have to create this:
(http://web.syr.edu/~pdbonnev/small-bg.png)

to get this:
(http://www.rockbox.org/twiki/pub/Main/WpsGallery/simply-rxbx.png)
Title: Re: WPS Bitmaps - inverted
Post by: ENWOD on November 18, 2005, 04:25:10 PM
I have no problems, although i use Photoshop, then save as a .jpg, i then open that in Paint and save it, no problems doing it that way... :D See if that makes a difference? Perhaps  ???
Title: Re: WPS Bitmaps - inverted
Post by: belly917 on November 18, 2005, 04:45:38 PM
I have no problems, although i use Photoshop, then save as a .jpg, i then open that in Paint and save it, no problems doing it that way... :D See if that makes a difference? Perhaps  ???

Saving a jpeg from photoshop just to open it in paint and then to save as a monochrome bitmap seems like alot of extra steps when photoshop is perfectely capable of saving as a 1bit bitmap.

But just to see if maybe photoshop is at fault, I used your method, and it didn't help.

I'm wondering if there's a bug in the code in rockbox that handles bmp's and my file has does something that triggers that bug?  i only say this because I saw a comment in the IRC logs (about a month ago) that mentioned that sometimes images got inverted.  Maybe this is a residual bug?
Title: Re: WPS Bitmaps - inverted
Post by: LinusN on November 18, 2005, 05:10:12 PM
Yes, it is a simplification in the BMP file reader in Rockbox. It assumes that the first entry in the palette is the background and the second is the foreground. Sometimes, the imaging application swap the two, and you end up with inverted images.
Title: Re: WPS Bitmaps - inverted
Post by: belly917 on November 18, 2005, 05:26:35 PM
Thanks for the reply Linus.

Well, I guess that means that everybody's version of rockbox will interprete the bitmap the same way.  Therefore I won't bother to change it.  (because who really cares if the supporting file is inverted if it shows up correctly?)

So if anyone else uses my WPSes, it'll display correctly despite the inverted bmp file.
Title: Re: WPS Bitmaps - inverted
Post by: kenshin on November 18, 2005, 06:56:33 PM
I use GIMP for all my photo/image editing and it creates 1-bit BMP files perfectly fine out of the box.

http://www.gimp.org/