On Sun, 2009-04-19 at 00:14 +0100, Chris Young wrote: > libnsbmp decodes BMPs in the wrong colours. This is highly likely to > be an endian issue and all other formats decode correctly within > NetSurf.
I agree. > Even decode_bmp generates a PPM with the wrong colours, so the > problem appears to be internal to libnsbmp. Yup. > I notice the library has macros for reading values to avoid endian > issues but I don't see what else can be causing this? Is it actually > showing up with the correct colours on LE hardware? Yes, it is. I advise looking at anywhere where it constructs a value to be stored in scanline[x]. A cursory glance at the code indicates that this is highly likely not to be endian clean. J.
