Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: gama on January 26, 2022, 04:10:08 PM

Title: Need help with gradient in background image.
Post by: gama on January 26, 2022, 04:10:08 PM
Hello, I am working on a 1080x1920 cabbiev2 theme that I will include in a patch I am working on.

I have created a 1080x1920 backdrop image, with a gradient similar to the ones already present in the backdrop folder,
using inkscape.  I then export a png image which I then convert to bmp using gimp as 24 bit image.

The image displays correctly on the sdl app, but some colors are messed up when displaying it in an android phone.

Looking at the android sources, I found this:

Code: [Select]
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height)
        btm = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);

The surface bitmap is configured as a rgb_565 image, Is that the reason why the image is displayed incorrectly?

Can someone help me to create a correct image or is it possible to configure the surface bitmap as rgb8888 in the android port?