color problem for big endian fixes ??

Michael Drake tlsa at netsurf-browser.org
Wed Jun 17 14:35:39 BST 2009


In article
<OUT-4A35154B.MD-1.4.17.chris.young at unsatisfactorysoftware.co.uk>,
   Chris Young <chris.young at unsatisfactorysoftware.co.uk> wrote:
> On Sun, 14 Jun 2009 15:50:43 +0200, Bernd Roesch wrote:

> > below code work and colors are correct for text, fb_32bpp_fill.So it
> > seem sure data come in abgr Format. But colors are wrong for
> > images.here i need red and blue change because the netsurf image on
> > welcome page is yellow.but the right rectangle is blue.

> Colours are bgra, but bitmap images are rgba.  I don't know why, but
> my code has different orders for these too and I remember having
> similar problems trying to get the colours right.

I think the situation is:


On little endian systems the colour format is:

  + ABGR for everything.

On big endian systems the colour format is:

  + ABGR for everything that is not a bitmap, and
  + RGBA for bitmaps.

Currently the framebuffer front end treats colours originating from
bitmaps the same as it treats colours coming from everything else. This is
fine on LE, but breaks on BE.

We could change the core to make the colour format more consistent, or we
would change the framebuffer front end to handle colour conversion for
colours coming from bitmaps differently. I'd prefer to do the former.

Also the framebuffer front end probably needs to cope with the actual
framebuffer having any particular component order.

-- 

Michael Drake (tlsa)                  http://www.netsurf-browser.org/




More information about the netsurf-dev mailing list