From 594591c9a7a04a16dd1446ad83c3597fc0244b52 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Mon, 19 Dec 2022 08:25:42 +0200 Subject: [PATCH] include local png/jpeg header files --- src/3dengfx/src/gfx/image_jpg.c | 2 +- src/3dengfx/src/gfx/image_png.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/3dengfx/src/gfx/image_jpg.c b/src/3dengfx/src/gfx/image_jpg.c index 02e7ab2..ff1c5bd 100644 --- a/src/3dengfx/src/gfx/image_jpg.c +++ b/src/3dengfx/src/gfx/image_jpg.c @@ -37,7 +37,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #define HAVE_BOOLEAN #endif -#include +#include "jpeglib.h" #include "color_bits.h" typedef struct diff --git a/src/3dengfx/src/gfx/image_png.c b/src/3dengfx/src/gfx/image_png.c index 47f1650..2c9b360 100644 --- a/src/3dengfx/src/gfx/image_png.c +++ b/src/3dengfx/src/gfx/image_png.c @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifdef IMGLIB_USE_PNG #include -#include +#include "png.h" #include "color_bits.h" #include "common/types.h" @@ -51,7 +51,7 @@ void *load_png(FILE *fp, unsigned long *xsz, unsigned long *ysz) { png_info *info_ptr; int i; uint32_t **lineptr, *pixels; - uint32_t width, height; + png_uint_32 width, height; int channel_bits, color_type, ilace_type, compression, filtering; if(!(png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0))) { @@ -64,8 +64,8 @@ void *load_png(FILE *fp, unsigned long *xsz, unsigned long *ysz) { fclose(fp); return 0; } - - if(setjmp(png_jmpbuf(png_ptr))) { + + if(setjmp(png_jmpbuf(png_ptr))) { png_destroy_read_struct(&png_ptr, &info_ptr, 0); fclose(fp); return 0; -- 1.7.10.4