diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 00:47:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 00:47:19 +0400 |
commit | 30fd1ab523393216a66a7debb7e42ec39e40a242 (patch) | |
tree | a3ce9ca35b4f177f0dd31e62691a4613b242aaae /source/blender/imbuf/intern/jp2.c | |
parent | 02a164baaa57ab037419fde864e02d6a432e858d (diff) |
replace ImBuf.depth with ImBuf.planes to match ImageFormatData.planes & to avoid confusion with ImageFormatData.depth
Diffstat (limited to 'source/blender/imbuf/intern/jp2.c')
-rw-r--r-- | source/blender/imbuf/intern/jp2.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index 151933d6651..568dd7a9fb7 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -101,7 +101,7 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags) int index; - int w, h, depth; + int w, h, planes; opj_dparameters_t parameters; /* decompression parameters */ @@ -166,10 +166,10 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags) switch (image->numcomps) { case 1: /* Greyscale */ case 3: /* Color */ - depth= 24; + planes= 24; break; default: /* 2 or 4 - Greyscale or Color + alpha */ - depth= 32; /* greyscale + alpha */ + planes= 32; /* greyscale + alpha */ break; } @@ -190,7 +190,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); + ibuf= IMB_allocImBuf(w, h, planes, use_float ? IB_rectfloat : IB_rect); if (ibuf==NULL) { if(dinfo) @@ -494,7 +494,7 @@ static opj_image_t* ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters) { /* 32bit images == alpha channel */ /* grayscale not supported yet */ - numcomps= (ibuf->depth==32) ? 4 : 3; + numcomps= (ibuf->planes==32) ? 4 : 3; } w= ibuf->x; |