Page 4 of 7

Re: Usplash Maker

PostPosted: Sun May 25, 2008 9:30 pm
by golinux
Thank you so much for this wonderful script! Usplash Maker worked perfectly for me with pngs. It didn't like jpgs.

One question . . . I remove the quiet option to keep track of things as the system boots. Problem is the colors are absolutely awful and clash with the splash image! Can the colors be changed and if so, where? Does this have to do with the "pretty colors" option in menu.lst?

I guess I could reinstate "quiet" but I'd prefer to have harmonious colors. BTW, running Gutsy (but with a Hardy kernel).

Thanks again.

Re: Usplash Maker

PostPosted: Tue May 27, 2008 7:01 pm
by vinca
golinux wrote:Thank you so much for this wonderful script! Usplash Maker worked perfectly for me with pngs. It didn't like jpgs.

One question . . . I remove the quiet option to keep track of things as the system boots. Problem is the colors are absolutely awful and clash with the splash image! Can the colors be changed and if so, where? Does this have to do with the "pretty colors" option in menu.lst?

I guess I could reinstate "quiet" but I'd prefer to have harmonious colors. BTW, running Gutsy (but with a Hardy kernel).

Thanks again.

not sure if you can find it in regular ubuntu, but in ultimate edition there is start-up manager where you can configure colors of some things, mebbe not what you want but i hope so ;)

Re: Usplash Maker

PostPosted: Tue May 27, 2008 11:43 pm
by cowboy
Please be careful in..Start up Manager..if you don't know what you are doing you can really mess your install up.. ;) http://web.telia.com/~u88005282/sum/index.html
I believe that the problem with TUM (upsplash maker) that it was written for Gutsy and not yet refined for Hardy...I could be wrong and will be corrected.. :|

Re: Usplash Maker

PostPosted: Wed May 28, 2008 4:58 pm
by golinux
cowboy wrote:Please be careful in..Start up Manager..if you don't know what you are doing you can really mess your install up.. ;) http://web.telia.com/~u88005282/sum/index.html
I believe that the problem with TUM (upsplash maker) that it was written for Gutsy and not yet refined for Hardy...I could be wrong and will be corrected.. :|

Thanks for the responses. vinca . . . the colors for the usplash need to be encapsulated in the .so file so I don't see how SUM would be able to do that. Besides am a little leery of mixing apps from different distros. cowboy . . . your warning is appreciated but nothing ventured, you know. ;)

TUM works perfectly on my Gutsy install. Haven't tried creating a usplash on Hardy yet but the usplashes I made on Gutsy work just fine on Hardy.

For the moment I have reinstated the 'quiet' option but am looking deeper into the MakeUsplash script. It calls http://ubuntusoftware.info/scripts/USpl ... ash.tar.gz where the palette info is stored:

Code: Select all
   /* Palette indexes */
   .background             = 0x0,
     .progressbar_background = 0x7,
     .progressbar_foreground = 0x156,
   .text_background        = 0x15,
   .text_foreground        = 0x252, /*was 31*/
   .text_success           = 0x171,
   .text_failure           = 0x156,


I'm pretty sure this is where the color changes should be made but I am unfamiliar with the indexed color codes (maybe you have a good link?). Then I would have to save the revised .c file and point the links in the script to it. Not to worry, I would do all the experimentation either in Virtual Box or on a spare machine used for 'learning'. ;)

I've never worked in C code before but with a background in web design and lot's of practice getting into the guts of things on my OS, I'm hoping I can figure this out. Any advice on the best way to proceed?

(Sometimes you just have to be fearless!)

Re: Usplash Maker

PostPosted: Wed May 28, 2008 5:35 pm
by vinca
sorry was just throwing it out there :oops:

Re: Usplash Maker

PostPosted: Tue Jun 17, 2008 11:07 am
by TheeMahn
golinux wrote:
cowboy wrote:Please be careful in..Start up Manager..if you don't know what you are doing you can really mess your install up.. ;) http://web.telia.com/~u88005282/sum/index.html
I believe that the problem with TUM (upsplash maker) that it was written for Gutsy and not yet refined for Hardy...I could be wrong and will be corrected.. :|

Thanks for the responses. vinca . . . the colors for the usplash need to be encapsulated in the .so file so I don't see how SUM would be able to do that. Besides am a little leery of mixing apps from different distros. cowboy . . . your warning is appreciated but nothing ventured, you know. ;)

TUM works perfectly on my Gutsy install. Haven't tried creating a usplash on Hardy yet but the usplashes I made on Gutsy work just fine on Hardy.

For the moment I have reinstated the 'quiet' option but am looking deeper into the MakeUsplash script. It calls http://ubuntusoftware.info/scripts/USpl ... ash.tar.gz where the palette info is stored:

Code: Select all
   /* Palette indexes */
   .background             = 0x0,
     .progressbar_background = 0x7,
     .progressbar_foreground = 0x156,
   .text_background        = 0x15,
   .text_foreground        = 0x252, /*was 31*/
   .text_success           = 0x171,
   .text_failure           = 0x156,


I'm pretty sure this is where the color changes should be made but I am unfamiliar with the indexed color codes (maybe you have a good link?). Then I would have to save the revised .c file and point the links in the script to it. Not to worry, I would do all the experimentation either in Virtual Box or on a spare machine used for 'learning'. ;)

I've never worked in C code before but with a background in web design and lot's of practice getting into the guts of things on my OS, I'm hoping I can figure this out. Any advice on the best way to proceed?

(Sometimes you just have to be fearless!)


You are right & wrong ;) The older version that used that tar file for the palette is now generated based on the image you are using. It takes your selected image combines the progress bar right into the image and uses clipping to draw the image back out (palletized), unfortunately the image is still 8bit (256 colors) so does not give you much to work with.

I suggest at the end of the script where it cleans up remove the statement that scraps the workinprogess directory, examine the pallete in hexdecimal and re-write the c code to point to the desired color (big pain in the rump). Then do the following in the terminal in that folder:
Code: Select all
make clean
make


I am sure this to be informative, but do not for the individual in question to be willing to go through all that.

TheeMahn

Re: Usplash Maker

PostPosted: Tue Aug 19, 2008 12:07 am
by red_team316
Quote by TheeMahn
It takes your selected image combines the progress bar right into the image and uses clipping to draw the image back out (palletized),


hmm...that sounds pretty nasty, the code that is. Practically rewriting usplash implementation, sounds like a hack.

Whats been going on lately? I have made some more progress on my usplashmagick stuff that handles paletting even better than our old implementation, as well as some other stuff. Once I get it further, I will let you know.

Hey what happened to your PI usplash code? I've never seen it. I'm always interested in the source and/or implementation. Drop me an email if you'd like WIP usplashmagick stuff, I know you've got my email now.


BTW: using hex colors in usplash is incorrect. See Ubuntu Bug#66760
https://bugs.launchpad.net/ubuntu/+sour ... +bug/66760

Re: Usplash Maker

PostPosted: Tue Aug 19, 2008 1:54 pm
by TheeMahn
cowboy wrote:Please be careful in..Start up Manager..if you don't know what you are doing you can really mess your install up.. ;) http://web.telia.com/~u88005282/sum/index.html
I believe that the problem with TUM (upsplash maker) that it was written for Gutsy and not yet refined for Hardy...I could be wrong and will be corrected.. :|


You are correct... I had to re-write it to support long integers to make Ultimate Edition 1.9's Usplash ( I also added widescreen support) I now provide the source...

To the above that would like to change the colors of text (in the c code for each resolution)...
Code: Select all
   /* Palette indexes */
   .background             = 0x0,
     .progressbar_background = 0x7,
     .progressbar_foreground = 0x156,
   .text_background        = 0x15,
   .text_foreground        = 0x31,
   .text_success           = 0x171,
   .text_failure           = 0x156,


this is you color index it addresses the palette in hexadecimal.

TheeMahn

Re: Usplash Maker

PostPosted: Tue Aug 19, 2008 2:01 pm
by TheeMahn
red_team316 wrote:Quote by TheeMahn
It takes your selected image combines the progress bar right into the image and uses clipping to draw the image back out (palletized),


hmm...that sounds pretty nasty, the code that is. Practically rewriting usplash implementation, sounds like a hack.

Whats been going on lately? I have made some more progress on my usplashmagick stuff that handles paletting even better than our old implementation, as well as some other stuff. Once I get it further, I will let you know.

Hey what happened to your PI usplash code? I've never seen it. I'm always interested in the source and/or implementation. Drop me an email if you'd like WIP usplashmagick stuff, I know you've got my email now.


BTW: using hex colors in usplash is incorrect. See Ubuntu Bug#66760
https://bugs.launchpad.net/ubuntu/+sour ... +bug/66760



The above bug maybe true in edgy, maybe even feisty... in hardy it uses long integers and the reason I had to re-write it (as can be seen above), BTW usplash-dev was replaced with libusplash-dev... I am sorry I do not have time to write a GTK (GUI based app at this time, my basket is way too full)

Re: Usplash Maker

PostPosted: Tue Aug 19, 2008 10:47 pm
by red_team316
TheeMahn wrote:The above bug maybe true in edgy, maybe even feisty... in hardy it uses long integers and the reason I had to re-write it (as can be seen above), BTW usplash-dev was replaced with libusplash-dev... I am sorry I do not have time to write a GTK (GUI based app at this time, my basket is way too full)

I have to disagree with you. Here's revision 1 of usplash-theme.h from the svn/bzr and it has always used short integers for palette index values. I looked at your source for 1.9 you posted above, and couldn't find where you changed anything to a long integer. Am I missing something here or did you rewrite the low-end usplash code?
Rev 1 of usplash-theme.h

I did notice that you've used some of the paletting/appending concepts we've whipped up but they still aren't perfect. I opened up the various resolutions in GIMP and checked, and they all have a different number of colors and do not share the same palette across all images. When converting, appending, and cropping the images use the -depth 8 and -colors 256 options also. Sorry, but I figured this out after I posted my last code.
examples:
Code: Select all
convert usplash/usplash.png -resize "800X600!" -quality 100 -strip -colors 256 -depth 8 usplash/tmp_800_600.png


Code: Select all
convert usplash/tmp_600_400.png usplash/tmp_640_480.png usplash/tmp_800_600.png usplash/tmp_1024_768.png usplash/tmp_1152_864.png usplash/tmp_1280_1024.png usplash/tmp_1600_1200.png usplash/tmp_1920_1440.png usplash/throbber_back.png usplash/throbber_fore.png -append +dither -colors 256 -depth 8 usplash/pal.png


Code: Select all
convert usplash/pal.png -crop 800x600+0+880! -depth 8 usplash/usplash_800_600.png

Since your splash images are grayscale colors, you wont really notice any problems, but if you used an image with lots of reds/greens/blues/etc, you would notice inconsistencies with the colors when it comes to text and such, since each different resolution would have a different color at index 251 for example, and or it's very possible that index 251 just doesn't exist in that resolution.


Back to the Hex color bug. Trust me, I just tested your usplash for 1.9 and it's borked. Don't use hex values, use short ints(0-255), as an 8-bit image cannot have more than 256 colors. To prove it to you, copy your usplash to the /usr/lib/usplash directory and then test with this script. I can guarantee you that about halfway through the scrolling verbose text, it will start randomly changing colors.

Usage: sudo /bin/bash usplashmagick-test

usplashmagick-test
Code: Select all
#!/bin/bash
#
# Copyright (c) 2008 Reconstructor Team, TheeMahn
# If it wasn't for TheeMahn's hard work, this wouldn't exist.
# Originally Written by
#   Eisenberger Tama's <u-foka at freemail dot hu>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

echo "Testing newly created usplash..."

usplash -c -x 800 -y 600 $1 &
sleep 1
usplash_write "VERBOSE true"
usplash_write "TIMEOUT 0"
usplash_write "TEXT Testing usplash theme..."

sleep 1
usplash_write "SUCCESS [OK]"
usplash_write "TEXT Progress 20%..."
usplash_write "PROGRESS 20"

sleep 1
usplash_write "SUCCESS [OK]"
usplash_write "TEXT Progress 40%..."
usplash_write "PROGRESS 40"

sleep 1
usplash_write "SUCCESS [OK]"
usplash_write "TEXT Progress 60%..."
usplash_write "PROGRESS 60"

sleep 1
usplash_write "SUCCESS [OK]"
usplash_write "TEXT Progress 80%..."
usplash_write "PROGRESS 80"

sleep 1
usplash_write "SUCCESS [OK]"
usplash_write "TEXT Progress 100%..."
usplash_write "PROGRESS 100"

sleep 1
usplash_write "SUCCESS [OK]"
usplash_write "TEXT Sending Failed Message..."
sleep 1
usplash_write "FAILURE [FAILED]"
usplash_write "TEXT Pulsating..."
sleep 1
usplash_write "SUCCESS [OK]"
usplash_write "PULSATE"
sleep 10
usplash_write "SUCCESS [OK]"
sleep 2
usplash_write "QUIT"

echo "Did you see the Usplash?"

Ignore the fact that [FAILED] wont print out fully, thats just because your .status_width = 35,

Please don't let another Ultimate Usplash be borked upon release :P

As far as a GUI/GTK usplash maker, don't worry about it too much, I'm planning on doing a GTK/python for usplashmagick, and I can almost guarantee you are going to be the first person I want testing it :) ...I just need to find time myself to get it done.