diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-07-13 14:58:17 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-07-13 14:58:17 +0300 |
commit | e142ae77cadf04103fbc643f21cf60891862f6a8 (patch) | |
tree | 142e25fccd5ba3e748a1652706e7e4f1220ca289 /source/blender/imbuf/intern/iris.c | |
parent | 107bbee4c763c95ea5d07a3b2f08bfe3b6adb24c (diff) |
Imbuf types refactor.
ImBuf types were getting stored as bitflags in a 32bit integer which had
already run out of space. Solved the problem by separating file type to
an ftype enum, and file specific options to foptions.
Reviewed by Campbell, thanks a lot!
Diffstat (limited to 'source/blender/imbuf/intern/iris.c')
-rw-r--r-- | source/blender/imbuf/intern/iris.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index d2e3f7bff41..7a9fa2b9768 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -45,6 +45,8 @@ #include "IMB_colormanagement.h" #include "IMB_colormanagement_intern.h" +#define IMAGIC 0732 + typedef struct { unsigned short imagic; /* stuff saved on disk . . */ unsigned short type; @@ -299,7 +301,7 @@ struct ImBuf *imb_loadiris(const unsigned char *mem, size_t size, int flags, cha if (flags & IB_test) { ibuf = IMB_allocImBuf(image.xsize, image.ysize, 8 * image.zsize, 0); - if (ibuf) ibuf->ftype = IMAGIC; + if (ibuf) ibuf->ftype = IMB_FTYPE_IMAGIC; return(ibuf); } @@ -526,7 +528,7 @@ struct ImBuf *imb_loadiris(const unsigned char *mem, size_t size, int flags, cha } - ibuf->ftype = IMAGIC; + ibuf->ftype = IMB_FTYPE_IMAGIC; test_endian_zbuf(ibuf); @@ -701,7 +703,7 @@ static int output_iris(unsigned int *lptr, int xsize, int ysize, int zsize, cons lumbuf = (unsigned int *)MEM_mallocN(xsize * sizeof(int), "iris lumbuf"); memset(image, 0, sizeof(IMAGE)); - image->imagic = IMAGIC; + image->imagic = IMB_FTYPE_IMAGIC; image->type = RLE(1); if (zsize > 1) image->dim = 3; |