* Source/NSBitmapImageRep+PNG.m

(-_PNGRepresentationWithProperties:): Revert last change and
don't use png_info_init_3() on PNG >= 1.5.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36178 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2013-02-21 08:53:31 +00:00
parent 1e8942edec
commit 374047524a
2 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2013-02-21 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSBitmapImageRep+PNG.m
(-_PNGRepresentationWithProperties:): Revert last change and don't
use png_info_init_3() on PNG >= 1.5.
2013-02-21 Riccardo Mottola <rm@gnu.org>
* Source/NSBitmapImageRep+PNG.m

View file

@ -48,10 +48,6 @@
#endif /* HAVE_LIBPNG */
#if !defined png_sizeof
#define png_sizeof(x) sizeof(x)
#endif
/* we import all the standard headers to allow compilation without PNG */
#import <Foundation/NSData.h>
#import <Foundation/NSDictionary.h>
@ -363,7 +359,11 @@ static void writer_func(png_structp png_struct, png_bytep data,
// init structures
PNGRep = [NSMutableData dataWithLength: 0];
#if PNG_LIBPNG_VER < 10500
// I don't think this was ever needed as png_create_info_struct()
// sets up the structure correctly and we rely on that in all other places.
png_info_init_3(&png_info, png_sizeof(png_info));
#endif
png_set_write_fn(png_struct, PNGRep, writer_func, NULL);
png_set_IHDR(png_struct, png_info, width, height, depth,
type, interlace, PNG_COMPRESSION_TYPE_BASE,