diff options
author | Kent Mein <mein@cs.umn.edu> | 2004-12-09 16:09:11 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2004-12-09 16:09:11 +0300 |
commit | bdffe196afee7ea2cd5bbdffa3514b4ae2b68196 (patch) | |
tree | 80860cf841f227bafe614f068ee20c0b7ca36c48 /source/blender/imbuf/intern/png.c | |
parent | eae5d39899652f86e2b9288a69395dfcec27c8b1 (diff) |
This fixes bug #1990
It moves targa, bmp, iris and png loading so that were not opening
2 file handles for each file, and made them like the jpeg stuff.
Also cleaned up some minor other stuff.
Kent
Diffstat (limited to 'source/blender/imbuf/intern/png.c')
-rw-r--r-- | source/blender/imbuf/intern/png.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index d8ec1a293dc..50b65befe48 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -33,10 +33,6 @@ #include "png.h" -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - #ifdef WIN32 #include "BLI_winstuff.h" #endif @@ -106,7 +102,7 @@ static void ReadData( png_structp png_ptr, png_bytep data, png_size_t length) longjmp(png_jmpbuf(png_ptr), 1); } -short imb_savepng(struct ImBuf *ibuf, int file, int flags) +short imb_savepng(struct ImBuf *ibuf, char *name, int flags) { png_structp png_ptr; png_infop info_ptr; @@ -198,7 +194,7 @@ short imb_savepng(struct ImBuf *ibuf, int file, int flags) WriteData, Flush); } else { - fp = fdopen(file, "wb"); + fp = fopen(name, "wb"); png_init_io(png_ptr, fp); } |