Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Mein <mein@cs.umn.edu>2004-12-09 16:09:11 +0300
committerKent Mein <mein@cs.umn.edu>2004-12-09 16:09:11 +0300
commitbdffe196afee7ea2cd5bbdffa3514b4ae2b68196 (patch)
tree80860cf841f227bafe614f068ee20c0b7ca36c48 /source/blender/imbuf/intern/bmp.c
parenteae5d39899652f86e2b9288a69395dfcec27c8b1 (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/bmp.c')
-rw-r--r--source/blender/imbuf/intern/bmp.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c
index cc1040abdcc..2cd9e35ba88 100644
--- a/source/blender/imbuf/intern/bmp.c
+++ b/source/blender/imbuf/intern/bmp.c
@@ -44,10 +44,6 @@
#include "IMB_cmap.h"
#include "IMB_bmp.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
/* some code copied from article on microsoft.com, copied
here for enhanced BMP support in the future
http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0197/mfcp1/mfcp1.htm&nav=/msj/0197/newnav.htm
@@ -199,7 +195,7 @@ int putShortLSB(unsigned short us,FILE *ofile) {
}
/* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */
-short imb_savebmp(struct ImBuf *ibuf, int outfile, int flags) {
+short imb_savebmp(struct ImBuf *ibuf, char *name, int flags) {
BMPINFOHEADER infoheader;
int bytesize, extrabytes, x, y, t, ptr;
@@ -210,7 +206,7 @@ short imb_savebmp(struct ImBuf *ibuf, int outfile, int flags) {
bytesize = (ibuf->x * 3 + extrabytes) * ibuf->y;
data = (uchar *) ibuf->rect;
- ofile = fdopen(outfile,"ab");
+ ofile = fopen(name,"ab");
putShortLSB(19778,ofile); /* "BM" */
putIntLSB(0,ofile); /* This can be 0 for BI_RGB bitmaps */