diff options
Diffstat (limited to 'source/blender/imbuf/intern/tiff.c')
-rw-r--r-- | source/blender/imbuf/intern/tiff.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 5b77c6c7c36..5c3451fd6f4 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -45,12 +45,13 @@ #include <string.h> #include "imbuf.h" - -#include "BKE_global.h" -#include "BKE_utildefines.h" #include "BLI_math.h" #include "BLI_string.h" +#include "BLI_utildefines.h" + +#include "BKE_global.h" + #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -93,11 +94,18 @@ typedef struct ImbTIFFMemFile { static void imb_tiff_DummyUnmapProc(thandle_t fd, tdata_t base, toff_t size) { + (void)fd; + (void)base; + (void)size; } static int imb_tiff_DummyMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize) { - return (0); + (void)fd; + (void)pbase; + (void)psize; + + return (0); } /** @@ -154,6 +162,10 @@ static tsize_t imb_tiff_ReadProc(thandle_t handle, tdata_t data, tsize_t n) */ static tsize_t imb_tiff_WriteProc(thandle_t handle, tdata_t data, tsize_t n) { + (void)handle; + (void)data; + (void)n; + printf("imb_tiff_WriteProc: this function should not be called.\n"); return (-1); } @@ -368,7 +380,7 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image, int premul) ib_flag = IB_rect; } - tmpibuf= IMB_allocImBuf(ibuf->x, ibuf->y, ibuf->depth, ib_flag, 0); + tmpibuf= IMB_allocImBuf(ibuf->x, ibuf->y, ibuf->depth, ib_flag); /* simple RGBA image */ if (!(bitspersample == 32 || bitspersample == 16)) { @@ -497,7 +509,7 @@ ImBuf *imb_loadtiff(unsigned char *mem, size_t size, int flags) ib_depth = (spp==3)?24:32; - ibuf = IMB_allocImBuf(width, height, ib_depth, 0, 0); + ibuf = IMB_allocImBuf(width, height, ib_depth, 0); if(ibuf) { ibuf->ftype = TIF; } @@ -533,7 +545,7 @@ ImBuf *imb_loadtiff(unsigned char *mem, size_t size, int flags) width= (width > 1)? width/2: 1; height= (height > 1)? height/2: 1; - hbuf= IMB_allocImBuf(width, height, 32, 0, 0); + hbuf= IMB_allocImBuf(width, height, 32, 0); hbuf->miplevel= level; hbuf->ftype= ibuf->ftype; ibuf->mipmap[level-1] = hbuf; @@ -631,7 +643,7 @@ void imb_loadtiletiff(ImBuf *ibuf, unsigned char *mem, size_t size, int tx, int * @return: 1 if the function is successful, 0 on failure. */ -int imb_savetiff(ImBuf *ibuf, char *name, int flags) +int imb_savetiff(ImBuf *ibuf, const char *name, int flags) { TIFF *image = NULL; uint16 samplesperpixel, bitspersample; @@ -748,7 +760,7 @@ int imb_savetiff(ImBuf *ibuf, char *name, int flags) if (samplesperpixel == 4) { to16[to_i+3] = FTOUSHORT(fromf[from_i+3]); - to_i++; from_i++; + /*to_i++; from_i++;*/ /*unused, set on each loop */ } } else { |