Code: Select all
/**
* @file silly-0.1.0-libpng15.diff
* @since Sun Feb 19 21:56:58 CET 2012
* @short diff options:-Nau6
*/
--- ./src/loaders/SILLYPNGImageLoader.cpp.orig 2012-02-19 21:48:21.827658990 +0100
+++ ./src/loaders/SILLYPNGImageLoader.cpp 2012-02-19 21:56:21.368577116 +0100
@@ -38,12 +38,14 @@
#include "loaders/SILLYPNGImageLoader.icpp"
#undef inline
#endif
#include "loaders/SILLYPNGImageContext.h"
#include <png.h>
+#include <zlib.h>
+
// Start section of namespace SILLY
namespace SILLY
{
void PNG_read_function(png_structp png_ptr, png_bytep data, png_size_t length)
{
PNGImageContext* png = reinterpret_cast<PNGImageContext*>(png_get_io_ptr(png_ptr));
@@ -63,13 +65,13 @@
void PNG_error_function(png_structp png_ptr,
png_const_charp error)
{
// printf("PNG Error: %s\n", error);
// copied from libpng's pngerror.cpp
jmp_buf buf;
- memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf));
+ memcpy(buf, png_jmpbuf(png_ptr), sizeof(jmp_buf));
longjmp(buf, 1);
}
PNGImageLoader::PNGImageLoader()
: ImageLoader("PNG Image Loader based on libpng")