[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] png on ppc mac
- From: "Trent Gamblin" <trent@xxxxxxxxxx>
- Date: Sat, 18 Jul 2009 09:21:55 -0600 (MDT)
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
}