Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: Frankenpod on January 17, 2022, 01:26:45 PM

Title: I never really understood how the (220x176) theme "Eight" worked
Post by: Frankenpod on January 17, 2022, 01:26:45 PM
Although I did a conversion of it to 320x240 size, I never figured out how this theme actually worked in the first place.
The creator seemed to have solved the problem of having anti-aliased icons with arbitrary backgrounds.  But when I look at the icon bitmaps in GIMP, they just come out as completely blank white images.
I'm assuming this is something to do with some hidden data in the image that I can't persuade GIMP to display?  But which the rockbox theme engine correctly interprets.

Is it that it needs something like photoshop to see these bitmaps correctly?
Title: Re: I never really understood how the (220x176) theme "Eight" worked
Post by: 7o9 on January 17, 2022, 01:40:05 PM
Could it be 32-bit images with an alpha channel? So RGBA bitmaps?

Perhaps GIMP fails to show those properly.
Title: Re: I never really understood how the (220x176) theme "Eight" worked
Post by: amachronic on January 17, 2022, 03:40:59 PM
ARGB bitmaps do work. The downside is they consume more memory. I've used GIMP to export ARGB bitmaps, and they work with Rockbox, but it seems it can't load the ones in that theme. They work fine after converting to PNG with imagemagick.
Title: Re: I never really understood how the (220x176) theme "Eight" worked
Post by: Frankenpod on January 18, 2022, 03:51:32 AM
Thanks.  The term "alpha channel" somehow occurred to me, but didn't mention it because TBH I don't really know what that is!
All I have is GIMP and an ancient shareware version of Paintshop Pro, and neither seem to be able to manipulate those particular bitmaps.  Pity as it seems like a way of having user-set colours while still being able to anti-alias icons.
Title: Re: I never really understood how the (220x176) theme "Eight" worked
Post by: 7o9 on January 18, 2022, 12:18:40 PM
Alpha channel is a 4rd 'layer' besides Red/Green/Blue that encodes the transparency of an image. That is how those images get their smooth transparancy edges.

As you mention Paintshop Pro, I am guessing you are on Windows.

Perhaps Paint.NET (https://www.getpaint.net/) works for those images. It is a small and free image editing program.
Title: Re: I never really understood how the (220x176) theme "Eight" worked
Post by: Frankenpod on January 24, 2022, 10:14:18 AM
Hmm, so now I've figured out how to create icons and things in GIMP with alpha channels, and rockbox theme engine interprets them correctly.  It's not quite as useful as I was thinking, because it still only allows anti-aliasing with fixed-colour icons on variable colour backgrounds - as far as I can tell it's still not possible to have AA when both foreground and background colours are changeable.  But it's still potentially useful.
Title: Re: I never really understood how the (220x176) theme "Eight" worked
Post by: Frankenpod on January 24, 2022, 10:18:43 AM
The other thing I was trying to do was make use of the "draw directly on backdrop" feature (i.e. %VB).  But that seems to behave in odd ways.  In particular it seems to play badly with the %Vi menu thing in custom status bars.  If you have a %Vi statement in the SBS then the backdrop colours, even in the WPS, all get set according to that statement, regardless of what you set it to previously.  Lord, the theme engine is complicated (with what seems like a lot of not-fully-documented behaviour, and a lot of features that seem to have been implemented but are almost never used - like the "wavy" theme seems to be the only one that ever made use of the features for customising the menu screen lists).