[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] PNG 1.5 update
From: |
Tony Theodore |
Subject: |
Re: [Mingw-cross-env-list] PNG 1.5 update |
Date: |
Sun, 6 Mar 2011 18:41:11 +1100 |
On 5 March 2011 02:06, Mark Brand <address@hidden> wrote:
>
>> I'd like to avoid having multiple libpng versions. It's such a small
>> package. If we can't make all other packages work with libpng15,
>> let's simply stick with libpng14.
>>
>
> All packages build now with libpng 1.5 as far as I know. Sdl_image is the
> latest solved:
Great work!
> http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/a657eff826c8
>
> Would someone please review the sdl_image patch before I send it upstream?
I'm not the best reviewer, but I'd remove one line that doesn't seem
necessary [1]. I added a libpng test program to generate a file and
updated the sdl_image test program to draw the image on screen and
pause:
http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/e93f232dc605
http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/dfe3b86cc8cf
All works fine.
Cheers,
Tony
[1]
diff -r dfe3b86cc8cf src/sdl_image-1-png.patch
--- a/src/sdl_image-1-png.patch Sun Mar 06 17:21:40 2011 +1100
+++ b/src/sdl_image-1-png.patch Sun Mar 06 18:35:21 2011 +1100
@@ -73,12 +73,11 @@
if ( surface == NULL ) {
error = "Out of memory";
goto done;
-@@ -466,6 +491,12 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src)
+@@ -466,6 +491,11 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src)
/* Load the palette, if any */
palette = surface->format->palette;
+#if (PNG_LIBPNG_VER >= 10500)
-+ palette = surface->format->palette;
+ png_colorp info_palette = 0;
+ int info_num_palette = 0;
+ png_get_PLTE(png_ptr, info_ptr, &info_palette, &info_num_palette);
- Re: [Mingw-cross-env-list] PNG 1.5 update, (continued)
- Re: [Mingw-cross-env-list] PNG 1.5 update, Mark Brand, 2011/03/03
- Re: [Mingw-cross-env-list] PNG 1.5 update, Mark Brand, 2011/03/03
- Re: [Mingw-cross-env-list] PNG 1.5 update, Tony Theodore, 2011/03/04
- Re: [Mingw-cross-env-list] PNG 1.5 update, Mark Brand, 2011/03/04
- Re: [Mingw-cross-env-list] PNG 1.5 update, Mark Brand, 2011/03/04
- Re: [Mingw-cross-env-list] PNG 1.5 update, Tony Theodore, 2011/03/04
- Re: [Mingw-cross-env-list] PNG 1.5 update, Bart van Andel, 2011/03/06
- Re: [Mingw-cross-env-list] PNG 1.5 update, Tony Theodore, 2011/03/04
- Re: [Mingw-cross-env-list] PNG 1.5 update, Volker Grabsch, 2011/03/04
- Re: [Mingw-cross-env-list] PNG 1.5 update, Mark Brand, 2011/03/04
- Re: [Mingw-cross-env-list] PNG 1.5 update,
Tony Theodore <=
- Re: [Mingw-cross-env-list] PNG 1.5 update, Mark Brand, 2011/03/06
- Re: [Mingw-cross-env-list] PNG 1.5 update, Tony Theodore, 2011/03/06
- Re: [Mingw-cross-env-list] PNG 1.5 update, Mark Brand, 2011/03/06