Hello
On 31.05.10, you wrote:
>> native GUI you need pixel convert routines for Big endian
>
> Only for colour definitions though, not for bitmaps.
bitmaps and readrect need diffrent code.the bitmap code for 32 bit rgba and
bgra machines is this.
for (yloop = yoff; yloop < height; yloop += bmp_stride) {
for (xloop = 0; xloop < width; xloop++) {
abpixel = pixel[yloop + xloop + xoff];
#ifdef __BIG_ENDIAN_BGRA__
if ((abpixel & 0x000000FF) != 0) {
if ((abpixel & 0x000000FF) !=
0x000000FF) {
abpixel =
nsfb_plot_ablend_rgba(abpixel,
pixel_bgra_to_colour_rgba(*(pvideo + xloop)));
}
*(pvideo + xloop) =
colour_rgba_to_pixel_bgra(abpixel);
#else
if ((abpixel & 0xFF000000) != 0) {
if ((abpixel & 0xFF000000) !=
0xFF000000) {
abpixel =
nsfb_plot_ablend(abpixel,
pixel_to_colour(*(pvideo
+ xloop)));
}
*(pvideo + xloop) =
colour_to_pixel(abpixel);
#endif
and readrect is this
>
> I'm surprised this is an issue in nsfb, that really needs fixing.
>
> Chris
Regards