custom usplash in liveUSB

Asked by Vince

Hi,

I'm making a custom liveUSB from Ubuntu 9.10 "Karmic Koala" and I want to change the usplash screen.
I customized the usplash 0.27 from:
https://launchpad.net/ubuntu/+source/usplash-theme-ubuntu/0.27
with my logo.
As this logo has a white background, I tried to change the whole background from usplash-theme-ubuntu.c (line .background) but couldn't manage to find the color index for white. Finally, after *many* tries, I thought it could be in RGB (3 bytes), where #ffffff would be 16777215. I tried 16777214 and it worked. Perhaps just coincidence...?
Anyway, I proceeded with the change:
> dpkg-buildpackage -rfakeroot -us -uc
> cp usplash-theme-ubuntu.so /usr/lib/usplash
> update-initramfs -u
> usplash -c
At this point, the logo square slowly appears (from black to white) and then disappears (white to black), which makes it look very bad.

So here is my question: is my background color correct? and most of all, how can I stop this effect?
Thank you very much in advance for your help

Vince

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu usplash-theme-ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Vince
Solved:
Last query:
Last reply:
Revision history for this message
Sean Bright (sbright) said :
#1

I've been working on this myself recently. Based on the limited research that I have done, it appears that the ->background member is really a 16 bit color value, not an index into the pixmap palette as some of the comments in the source suggest. I haven't looked closely enough to determine if it is using 5/5/5/A or 5/6/5, but setting background to 0xffff does render as white.

As for the fading to black, this is because the fade is hard-coded to go to black instead of to the background color - from libusplash.c line 670:

    palette[i][j] = theme->pixmap->palette[i][j] * percentage / 100;

while will approach 0 (black) instead of whatever the background color is.

Revision history for this message
Vince (vmaury79) said :
#2

Thank you very much for your answer.
So I'll try to change the libusplash.c from palette[i][j] * percentage to palette[i][j] * (100 - percentage) and set my background to 0xffff.
Maybe the usplash will change for next ubuntu release, in order to adapt the image background to the whole theme background.

Thanks!

Vincent