Re: [AD] png on ppc mac

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Fri, July 17, 2009 10:26 pm, Matthew Leverton said:
> Loading a 24-bit or 32-bit PNG image in Allegro 4.9.12 on a PPC Mac
> causes all images to have RGBA reversed.
>
> Attached is a patch that fixes it.

Can you try the attached patch? Seems simpler and this is
what the original loadpng did.

Trent :{)>
Index: png.c
===================================================================
--- png.c	(revision 12286)
+++ png.c	(working copy)
@@ -177,9 +177,9 @@
       bpp = 8;
 
 
-   /* Maybe flip RGB to BGR. (FIXME: removed) */
    if ((bpp == 24) || (bpp == 32)) {
 #ifdef ALLEGRO_BIG_ENDIAN
+      png_set_bgr(png_ptr);
       png_set_swap_alpha(png_ptr);
 #endif
    }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/