compiling lux against libpng 1.4.0

Discussion and help for Compilation problems and platform portability.

Moderator: coordinators

compiling lux against libpng 1.4.0

Postby ornitorrincos » Fri Jan 22, 2010 5:59 am

here is the patch to do it:

Code: Select all
diff -rupN lux-36533b0843bd/core/cimg.h lux-fixed/core/cimg.h
--- lux-36533b0843bd/core/cimg.h   2009-12-19 10:39:59.000000000 +0100
+++ lux-fixed/core/cimg.h   2010-01-22 11:38:06.651814854 +0100
@@ -25679,7 +25679,7 @@ namespace cimg_library {
       png_read_info(png_ptr,info_ptr);
       png_uint_32 W, H;
       int bit_depth, color_type, interlace_type;
-      png_get_IHDR(png_ptr,info_ptr,&W,&H,&bit_depth,&color_type,&interlace_type,int_p_NULL,int_p_NULL);
+      png_get_IHDR(png_ptr,info_ptr,&W,&H,&bit_depth,&color_type,&interlace_type,(int *) NULL,(int *) NULL);
       int new_bit_depth = bit_depth;
       int new_color_type = color_type;
 
@@ -25690,7 +25690,7 @@ namespace cimg_library {
         new_bit_depth = 8;
       }
       if (new_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8){
-        png_set_gray_1_2_4_to_8(png_ptr);
+        png_set_expand_gray_1_2_4_to_8(png_ptr);
         new_bit_depth = 8;
       }
       if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))


png_set_gray_1_2_4_to_8 is deprecated and substituted with png_set_expand_gray_1_2_4_to_8
and int_p_NULL is no longer defined in png.h(was defined as (int *) NULL)

changelog:
http://libpng.sourceforge.net/ANNOUNCE-1.4.0.txt

I haven't tried to run it though
ornitorrincos
 
Posts: 8
Joined: Tue Jul 28, 2009 10:01 am

Re: compiling lux against libpng 1.4.0

Postby jromang » Fri Jan 22, 2010 6:28 am

Thanks onitorrincos, I report it right now to David Tschumperlé (the cimg library author).
User avatar
jromang
Developer
 
Posts: 557
Joined: Wed Sep 19, 2007 2:41 am


Return to Compilation & Portability

Who is online

Users browsing this forum: Bing [Bot] and 2 guests