12 March 2008

Dithering for GRUB

There is a hard constraint when creating GRUB splash images: they must be 640x480px with effectively 14 colors (16 colors, one must be white and another black) so the result is something which will look inevitably bad consider today's requirements and expectations.
The solutions are either to use custom patches (like gfxboot), wait for GRUB 2 (which seems to never come to an useful state) or try your best with dithering (which works OK for simple images but not so well for anything complex). And I have not touched yet the issue of various aspect ratio displays.

So here is a first iteration made by Mo for a GRUB splash based on the F9 Waves theme:

[grub splash]


On top of the inherent visible pixels, I have a big issue with it on my 20" widescreen display: the bubble does badly deformed (that happens when you use 4:3 video modes on wide screens). I expect a sulfur crystal will not look that bad when deformed. And I have the feeling the splash would look better un-centered.

Enough reasons to try my own variation, I edited the Inkscape made SVG and exported as a full color PNG, it looks quite nice:
[grub splash]


But as I said above, it needs to be uglified, to match the specifications, so let's make it indexed, 14 colors:
[dithering]


The result is really ugly, we have a lot of unwanted light pixels:
[grub splash]


So take the cone tool, clean them and then with a sharp brush solve some more minor details. Still ugly:
[grub splash]


I blame it on the blue flame, it is the primary source for this light color. So back to the source, remove the flame, export as PNG, index with dithering:
[grub splash]


A lot less bad pixels, GIMP them out:
[grub splash]


Much better but not sure it is good enough, I passed it as is. Mo takes the torch again: she lighten the background and dull the water reflections a bit, simplifies the yellow crystal, index the image with dithering and adjust the result removing some of the unwanted noise:
[grub splash]


Now about adding the blue flame back... that's really a tough one.

Note: to test those images as GRUB splashes, open the indexed PNGs with GIMP, save them as splash.xpm.gz and put the file in /boot/grub/

6 comments:

  1. Use grub2! Supports 1024x768 24bit PNG files on my laptop.

    ReplyDelete
  2. I mean this as nicely as possible, so don't take this the wrong way...

    I think you guys ought to revist the sulphur art work a bit. It has more than a passing resemblance to yellow dog crap (not saying it looks like crap relatively speaking, but that it ACTUALLY looks like it came from a dog. The "steaming" one with the blue smoke coming from it is even worse.

    Don't let our Ubuntu friends get a hold of this and make the obvious parody image, please :)

    ReplyDelete
  3. I started my post by talking about GRUB 2, which is not considered at feature parity with GRUB Legacy yet even by its own developers... not something one would want as default in a distribution.

    ReplyDelete
  4. Dog poop!
    Fortunately the last version from Mo preserves the crystal faces so it looks less like dog poop. I am not sure how will it look with flames added...

    ReplyDelete
  5. The Fedora Bubble thingie looks reasonable nice, but the yellow thingie just looks weird. Really. It needs some work.

    ReplyDelete
  6. I wish Grub2 was ready.. It would support 24/32pp natively :(

    ReplyDelete