diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-16 18:32:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-16 18:32:17 +0400 |
commit | 8268a4be71fe326b5b7b43e5e55ef751844dddbc (patch) | |
tree | 8b3dfadff9a45f48a31ca62dd2b807434ec614b8 /source/blender/imbuf/intern | |
parent | 7cc5aaf18afd882ee8fefdf773fb83eb2e0f467b (diff) |
most unused arg warnings corrected.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/allocimbuf.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/anim.c | 18 | ||||
-rw-r--r-- | source/blender/imbuf/intern/bmp.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/cineon/cineon_dpx.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/dds/dds_api.cpp | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 8 | ||||
-rw-r--r-- | source/blender/imbuf/intern/filter.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/iris.c | 10 | ||||
-rw-r--r-- | source/blender/imbuf/intern/jp2.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/jpeg.c | 6 | ||||
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_multi.h | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/png.c | 5 | ||||
-rw-r--r-- | source/blender/imbuf/intern/radiance_hdr.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/scaling.c | 10 | ||||
-rw-r--r-- | source/blender/imbuf/intern/targa.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/thumbs_blend.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/tiff.c | 19 |
19 files changed, 60 insertions, 48 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c index e67c319e61a..53828ed8ea8 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -324,7 +324,7 @@ short imb_addtilesImBuf(ImBuf *ibuf) return (ibuf->tiles != NULL); } -ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar d, unsigned int flags, uchar bitmap) /* XXX bitmap argument is deprecated */ +ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar d, unsigned int flags) { ImBuf *ibuf; @@ -384,7 +384,7 @@ ImBuf *IMB_dupImBuf(ImBuf *ibuf1) y = ibuf1->y; if(ibuf1->flags & IB_fields) y *= 2; - ibuf2 = IMB_allocImBuf(x, y, ibuf1->depth, flags, 0); + ibuf2 = IMB_allocImBuf(x, y, ibuf1->depth, flags); if(ibuf2 == NULL) return NULL; if(flags & IB_rect) diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index 096ed499f85..57d65bc6761 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -163,7 +163,7 @@ static ImBuf * movie_fetchibuf(struct anim * anim, int position) { if (anim == 0) return (0); - ibuf = IMB_allocImBuf(anim->x, anim->y, 24, IB_rect, 0); + ibuf = IMB_allocImBuf(anim->x, anim->y, 24, IB_rect); if ( mvReadFrames(anim->track, position, 1, ibuf->x * ibuf->y * sizeof(int), ibuf->rect ) != DM_SUCCESS ) { @@ -483,7 +483,7 @@ static ImBuf * avi_fetchibuf (struct anim *anim, int position) { #else if (1) { #endif - ibuf = IMB_allocImBuf (anim->x, anim->y, 24, IB_rect, 0); + ibuf = IMB_allocImBuf (anim->x, anim->y, 24, IB_rect); tmp = AVI_read_frame (anim->avi, AVI_FORMAT_RGB32, position, AVI_get_stream(anim->avi, AVIST_VIDEO, 0)); @@ -809,7 +809,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { if (anim == 0) return (0); - ibuf = IMB_allocImBuf(anim->x, anim->y, 32, IB_rect, 0); + ibuf = IMB_allocImBuf(anim->x, anim->y, 32, IB_rect); avpicture_fill((AVPicture*) anim->pFrameRGB, (unsigned char*) ibuf->rect, @@ -998,7 +998,7 @@ static ImBuf * redcode_fetchibuf(struct anim * anim, int position) { } ibuf = IMB_allocImBuf(raw_frame->width * 2, - raw_frame->height * 2, 32, IB_rectfloat, 0); + raw_frame->height * 2, 32, IB_rectfloat); redcode_decode_video_float(raw_frame, ibuf->rect_float, 1); @@ -1050,31 +1050,31 @@ static struct ImBuf * anim_getnew(struct anim * anim) { break; case ANIM_MOVIE: if (startmovie(anim)) return (0); - ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0, 0); /* fake */ + ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0); /* fake */ break; case ANIM_AVI: if (startavi(anim)) { printf("couldnt start avi\n"); return (0); } - ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0, 0); + ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0); break; #ifdef WITH_QUICKTIME case ANIM_QTIME: if (startquicktime(anim)) return (0); - ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0, 0); + ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0); break; #endif #ifdef WITH_FFMPEG case ANIM_FFMPEG: if (startffmpeg(anim)) return (0); - ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0, 0); + ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0); break; #endif #ifdef WITH_REDCODE case ANIM_REDCODE: if (startredcode(anim)) return (0); - ibuf = IMB_allocImBuf (8, 8, 32, 0, 0); + ibuf = IMB_allocImBuf (8, 8, 32, 0); break; #endif } diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index 450b09c923b..4c7cf669d18 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -129,9 +129,9 @@ struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags) /* printf("skip: %d, x: %d y: %d, depth: %d (%x)\n", skip, x, y, depth, bmi.biBitCount); */ if (flags & IB_test) { - ibuf = IMB_allocImBuf(x, y, depth, 0, 0); + ibuf = IMB_allocImBuf(x, y, depth, 0); } else { - ibuf = IMB_allocImBuf(x, y, depth, IB_rect, 0); + ibuf = IMB_allocImBuf(x, y, depth, IB_rect); bmp = mem + skip; rect = (unsigned char *) ibuf->rect; diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c index a9b229536cb..0eee1bd082a 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.c +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c @@ -88,7 +88,7 @@ static struct ImBuf *imb_load_dpx_cineon(unsigned char *mem, int use_cineon, int return NULL; } - ibuf = IMB_allocImBuf(width, height, 32, IB_rectfloat | flags, 0); + ibuf = IMB_allocImBuf(width, height, 32, IB_rectfloat | flags); row = MEM_mallocN(sizeof(unsigned short)*width*depth, "row in cineon_dpx.c"); frow = ibuf->rect_float+width*height*4; diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp index 2e224893271..08f60589977 100644 --- a/source/blender/imbuf/intern/dds/dds_api.cpp +++ b/source/blender/imbuf/intern/dds/dds_api.cpp @@ -104,7 +104,7 @@ struct ImBuf *imb_load_dds(unsigned char *mem, size_t size, int flags) // TODO use the image RGB or RGBA tag to determine the bits per pixel if (dds.hasAlpha()) bits_per_pixel = 32; else bits_per_pixel = 24; - ibuf = IMB_allocImBuf(dds.width(), dds.height(), bits_per_pixel, 0, 0); + ibuf = IMB_allocImBuf(dds.width(), dds.height(), bits_per_pixel, 0); if (ibuf == 0) return(0); /* memory allocation failed */ ibuf->ftype = DDS; diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 7b3a07f10ad..dfe316628f6 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -50,8 +50,8 @@ void IMB_de_interlace(struct ImBuf *ibuf) if (ibuf->rect) { /* make copies */ - tbuf1 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect, 0); - tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect, 0); + tbuf1 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect); + tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect); ibuf->x *= 2; IMB_rectcpy(tbuf1, ibuf, 0, 0, 0, 0, ibuf->x, ibuf->y); @@ -78,8 +78,8 @@ void IMB_interlace(struct ImBuf *ibuf) if (ibuf->rect) { /* make copies */ - tbuf1 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect, 0); - tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect, 0); + tbuf1 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect); + tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect); IMB_rectcpy(tbuf1, ibuf, 0, 0, 0, 0, ibuf->x, ibuf->y); IMB_rectcpy(tbuf2, ibuf, 0, 0, 0, tbuf2->y, ibuf->x, ibuf->y); diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c index 3cc266e460e..3c2c276b6e4 100644 --- a/source/blender/imbuf/intern/filter.c +++ b/source/blender/imbuf/intern/filter.c @@ -380,7 +380,7 @@ void IMB_makemipmap(ImBuf *ibuf, int use_filter) while(curmap < IB_MIPMAP_LEVELS) { if(use_filter) { - ImBuf *nbuf= IMB_allocImBuf(hbuf->x, hbuf->y, 32, IB_rect, 0); + ImBuf *nbuf= IMB_allocImBuf(hbuf->x, hbuf->y, 32, IB_rect); IMB_filterN(nbuf, hbuf); ibuf->mipmap[curmap] = IMB_onehalf(nbuf); IMB_freeImBuf(nbuf); diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index 883de823745..9037285a1c5 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -283,7 +283,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags) zsize = image.zsize; if (flags & IB_test) { - ibuf = IMB_allocImBuf(image.xsize, image.ysize, 8 * image.zsize, 0, 0); + ibuf = IMB_allocImBuf(image.xsize, image.ysize, 8 * image.zsize, 0); if (ibuf) ibuf->ftype = IMAGIC; return(ibuf); } @@ -315,7 +315,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags) if (bpp == 1) { - ibuf = IMB_allocImBuf(xsize, ysize, 8 * zsize, IB_rect, 0); + ibuf = IMB_allocImBuf(xsize, ysize, 8 * zsize, IB_rect); if (ibuf->depth > 32) ibuf->depth = 32; base = ibuf->rect; zbase = (unsigned int *)ibuf->zbuf; @@ -356,7 +356,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags) } else { /* bpp == 2 */ - ibuf = IMB_allocImBuf(xsize, ysize, 32, (flags & IB_rect)|IB_rectfloat, 0); + ibuf = IMB_allocImBuf(xsize, ysize, 32, (flags & IB_rect)|IB_rectfloat); fbase = ibuf->rect_float; @@ -399,7 +399,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags) } else { if (bpp == 1) { - ibuf = IMB_allocImBuf(xsize, ysize, 8 * zsize, IB_rect, 0); + ibuf = IMB_allocImBuf(xsize, ysize, 8 * zsize, IB_rect); if (ibuf->depth > 32) ibuf->depth = 32; base = ibuf->rect; @@ -424,7 +424,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags) } else { /* bpp == 2 */ - ibuf = IMB_allocImBuf(xsize, ysize, 32, (flags & IB_rect)|IB_rectfloat, 0); + ibuf = IMB_allocImBuf(xsize, ysize, 32, (flags & IB_rect)|IB_rectfloat); fbase = ibuf->rect_float; diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index a70c154014a..5e7ef199500 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -189,7 +189,7 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags) float_divs[i]= (1<<image->comps[i].prec)-1; } - ibuf= IMB_allocImBuf(w, h, depth, use_float ? IB_rectfloat : IB_rect, 0); + ibuf= IMB_allocImBuf(w, h, depth, use_float ? IB_rectfloat : IB_rect); if (ibuf==NULL) { if(dinfo) diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index 0a070646fd5..e020a5fa8fd 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -297,9 +297,9 @@ static ImBuf * ibJpegImageFromCinfo(struct jpeg_decompress_struct * cinfo, int f if (flags & IB_test) { jpeg_abort_decompress(cinfo); - ibuf = IMB_allocImBuf(x, y, 8 * depth, 0, 0); + ibuf = IMB_allocImBuf(x, y, 8 * depth, 0); } - else if ((ibuf = IMB_allocImBuf(x, y, 8 * depth, IB_rect, 0)) == NULL) { + else if ((ibuf = IMB_allocImBuf(x, y, 8 * depth, IB_rect)) == NULL) { jpeg_abort_decompress(cinfo); } else { @@ -699,7 +699,7 @@ static int save_jstjpeg(char * name, struct ImBuf * ibuf) struct ImBuf * tbuf; int oldy, returnval; - tbuf = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 24, IB_rect, 0); + tbuf = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 24, IB_rect); tbuf->ftype = ibuf->ftype; tbuf->flags = ibuf->flags; diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 4107f051d73..5b8c5c72802 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -975,7 +975,7 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, size_t size, int flags) } else { - ibuf = IMB_allocImBuf(width, height, 32, 0, 0); + ibuf = IMB_allocImBuf(width, height, 32, 0); ibuf->ftype = OPENEXR; /* openEXR is linear as per EXR spec */ diff --git a/source/blender/imbuf/intern/openexr/openexr_multi.h b/source/blender/imbuf/intern/openexr/openexr_multi.h index c66abe76289..3f80e5577a8 100644 --- a/source/blender/imbuf/intern/openexr/openexr_multi.h +++ b/source/blender/imbuf/intern/openexr/openexr_multi.h @@ -70,7 +70,7 @@ void * IMB_exr_get_handle (void) {return NULL;} void IMB_exr_add_channel (void *handle, const char *layname, const char *channame, int xstride, int ystride, float *rect) {} int IMB_exr_begin_read (void *handle, char *filename, int *width, int *height) {return 0;} -void IMB_exr_begin_write (void *handle, char *filename, int width, int height, int compress) {} +void IMB_exr_begin_write (void *handle, char *filename, int width, int height, int compress) { (void)handle; (void)filename; (void)width; (void)height; (void)compress; } void IMB_exrtile_begin_write (void *handle, char *filename, int mipmap, int width, int height, int tilex, int tiley) {} void IMB_exr_set_channel (void *handle, char *layname, char *channame, int xstride, int ystride, float *rect) {} diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index 6b21f20b3fb..b29a4ae0627 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -61,7 +61,8 @@ int imb_is_a_png(unsigned char *mem) } static void Flush(png_structp png_ptr) -{ +{ + (void)png_ptr; } static void WriteData( png_structp png_ptr, png_bytep data, png_size_t length) @@ -368,7 +369,7 @@ struct ImBuf *imb_loadpng(unsigned char *mem, size_t size, int flags) longjmp(png_jmpbuf(png_ptr), 1); } - ibuf = IMB_allocImBuf(width, height, 8 * bytesperpixel, 0, 0); + ibuf = IMB_allocImBuf(width, height, 8 * bytesperpixel, 0); if (ibuf) { ibuf->ftype = PNG; diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index 4064246c866..385124cd717 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -202,8 +202,8 @@ struct ImBuf *imb_loadhdr(unsigned char *mem, size_t size, int flags) ptr = (unsigned char *)strchr((char*)&mem[x+1], '\n'); ptr++; - if (flags & IB_test) ibuf = IMB_allocImBuf(width, height, 32, 0, 0); - else ibuf = IMB_allocImBuf(width, height, 32, (flags & IB_rect)|IB_rectfloat, 0); + if (flags & IB_test) ibuf = IMB_allocImBuf(width, height, 32, 0); + else ibuf = IMB_allocImBuf(width, height, 32, (flags & IB_rect)|IB_rectfloat); if (ibuf==NULL) return NULL; ibuf->ftype = RADHDR; diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index 4fccf5dae41..73dcc0c8ea9 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -62,7 +62,7 @@ struct ImBuf *IMB_half_x(struct ImBuf *ibuf1) if (ibuf1->x <= 1) return(IMB_dupImBuf(ibuf1)); - ibuf2 = IMB_allocImBuf((ibuf1->x)/2, ibuf1->y, ibuf1->depth, ibuf1->flags, 0); + ibuf2 = IMB_allocImBuf((ibuf1->x)/2, ibuf1->y, ibuf1->depth, ibuf1->flags); if (ibuf2==NULL) return (0); _p1 = (uchar *) ibuf1->rect; @@ -123,7 +123,7 @@ struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1) do_rect= (ibuf1->rect != NULL); do_float= (ibuf1->rect_float != NULL); - ibuf2 = IMB_allocImBuf(2 * ibuf1->x , ibuf1->y , ibuf1->depth, ibuf1->flags, 0); + ibuf2 = IMB_allocImBuf(2 * ibuf1->x , ibuf1->y , ibuf1->depth, ibuf1->flags); if (ibuf2==NULL) return (0); p1 = (int *) ibuf1->rect; @@ -181,7 +181,7 @@ struct ImBuf *IMB_half_y(struct ImBuf *ibuf1) do_rect= (ibuf1->rect != NULL); do_float= (ibuf1->rect_float != NULL); - ibuf2 = IMB_allocImBuf(ibuf1->x , (ibuf1->y) / 2 , ibuf1->depth, ibuf1->flags, 0); + ibuf2 = IMB_allocImBuf(ibuf1->x , (ibuf1->y) / 2 , ibuf1->depth, ibuf1->flags); if (ibuf2==NULL) return (0); _p1 = (uchar *) ibuf1->rect; @@ -249,7 +249,7 @@ struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1) do_rect= (ibuf1->rect != NULL); do_float= (ibuf1->rect_float != NULL); - ibuf2 = IMB_allocImBuf(ibuf1->x , 2 * ibuf1->y , ibuf1->depth, ibuf1->flags, 0); + ibuf2 = IMB_allocImBuf(ibuf1->x , 2 * ibuf1->y , ibuf1->depth, ibuf1->flags); if (ibuf2==NULL) return (0); p1 = (int *) ibuf1->rect; @@ -303,7 +303,7 @@ struct ImBuf *IMB_onehalf(struct ImBuf *ibuf1) if (ibuf1->x <= 1) return(IMB_half_y(ibuf1)); if (ibuf1->y <= 1) return(IMB_half_x(ibuf1)); - ibuf2=IMB_allocImBuf((ibuf1->x)/2, (ibuf1->y)/2, ibuf1->depth, ibuf1->flags, 0); + ibuf2=IMB_allocImBuf((ibuf1->x)/2, (ibuf1->y)/2, ibuf1->depth, ibuf1->flags); if (ibuf2==NULL) return (0); p1f = ibuf1->rect_float; diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index ada1f448bfc..e50e445034e 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -537,8 +537,8 @@ struct ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags) if (checktarga(&tga,mem) == 0) return(0); - if (flags & IB_test) ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,tga.pixsize, 0, 0); - else ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,(tga.pixsize + 0x7) & ~0x7, IB_rect, 0); + if (flags & IB_test) ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,tga.pixsize, 0); + else ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,(tga.pixsize + 0x7) & ~0x7, IB_rect); if (ibuf == 0) return(0); ibuf->ftype = TGA; diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index f3415d44ecb..8abc2e89952 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -280,7 +280,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im return NULL; } if (size == THB_FAIL) { - img = IMB_allocImBuf(1,1,32, IB_rect | IB_metadata, 0); + img = IMB_allocImBuf(1,1,32, IB_rect | IB_metadata); if (!img) return 0; } else { if (THB_SOURCE_IMAGE == source || THB_SOURCE_BLEND == source) { diff --git a/source/blender/imbuf/intern/thumbs_blend.c b/source/blender/imbuf/intern/thumbs_blend.c index f1f8383b85e..cd9bf9c7a3a 100644 --- a/source/blender/imbuf/intern/thumbs_blend.c +++ b/source/blender/imbuf/intern/thumbs_blend.c @@ -102,7 +102,7 @@ static ImBuf *loadblend_thumb(gzFile gzfile) return NULL; /* finally malloc and read the data */ - img= IMB_allocImBuf(size[0], size[1], 32, IB_rect | IB_metadata, 0); + img= IMB_allocImBuf(size[0], size[1], 32, IB_rect | IB_metadata); if(gzread(gzfile, img->rect, bhead[1]) != bhead[1]) { IMB_freeImBuf(img); diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 5b77c6c7c36..eb5d1f2c039 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -93,11 +93,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 +161,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 +379,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 +508,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 +544,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; |