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/blenkernel/intern/image.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/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 6a4cb049be7..c99396e6939 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -601,7 +601,7 @@ void BKE_image_memorypack(Image *ima) } ibuf->ftype= PNG; - ibuf->depth= 32; + ibuf->planes= R_IMF_PLANES_RGBA; IMB_saveiff(ibuf, ibuf->name, IB_rect | IB_mem); if(ibuf->encodedbuffer==NULL) { @@ -1535,7 +1535,7 @@ int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf) /* R_JPEG90, etc. default we save jpegs */ if(quality < 10) quality= 90; ibuf->ftype= JPG|quality; - if(ibuf->depth==32) ibuf->depth= 24; /* unsupported feature only confuses other s/w */ + if(ibuf->planes==32) ibuf->planes= 24; /* unsupported feature only confuses other s/w */ } BLI_make_existing_file(name); @@ -2487,13 +2487,13 @@ int BKE_image_has_alpha(struct Image *image) { ImBuf *ibuf; void *lock; - int depth; + int planes; ibuf= BKE_image_acquire_ibuf(image, NULL, &lock); - depth = (ibuf?ibuf->depth:0); + planes = (ibuf?ibuf->planes:0); BKE_image_release_ibuf(image, lock); - if (depth == 32) + if (planes == 32) return 1; else return 0; |