[haiku-development] Re: [PATCH] Add 8-bit indexed colour support to boot splash

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 29 Jul 2008 13:49:54 +0200

David Powell wrote:
> 2008/7/29 Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>:
> > Spacing of the function calls is wrong - it's always fprintf("") not 
> > fprintf ("") nor fprintf( "" ) :-)
> > Also, looking at the end of the patch, the output looks wrong, too, as 
> > there is an additional tab before the last '};'.
> > Other than that, the patch looks good to me.
> 
> Do you want me to fix those issues and re-submit the patch, or should I 
> fix them later?
> 
> > Grayscale is probably enough for the moment. You could do a simple 
> > palette replacement algorithm instead of a real color conversion, 
> > though -- dunno if that would look better, though. If we just do a 
> > simple conversion like this, I would actually prefer to do it "live" in 
> > the boot loader, though; at least it should consume less space, and 
> > should still be pretty much instant.
> 
> Since posting the patch, I've been working on the generate_boot_screen 
> program, and I've managed to add "Gervautz-Purgathofer octree 
> quantization" to the program, which means that it can now generate an 
> optimized 256 colour palette. (It's a open source implementation that 
> I've tweaked, I wouldn't want to
> take credit for stuff that isn't mine)
> 
> I've also added a nearest-colour mapping, which gives pretty good result 
> for an indexed colour image. I'm currently working on applying a dither 
> algorithm to the image
> to make it look even better, though I may submit a patch without the 
> dither, as it's a significant improvement on the greyscale image anyhow.
> 
> The upshot of all of that is that the colour image in 8-bit mode looks 
> really good,
> however the genereate_boot_screen can take a second or two to run with 
> the colour quantization, and probably longer once I get dithering to 
> work, so I don't
> think it would be a good idea to include those algorithms in the 
> bootloader to do it "live" as there would be a noticable speed penalty.

Wow, this is all pretty cool! Can you incorporate the suggested changes 
into the work you have done meanwhile and resend the patch? I was expecting 
the color quantization to take a little time and thought it would be better 
done by the generate_boot_screen tool. Once this is integrated, it would be 
even better if the color quantization could become available to other 
applications as well. The GIF and PNG translators could benefit from that 
as well as other graphics tools such as WonderBrush.

Best regards,
-Stephan

Other related posts: