diff options
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; |