diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-07-13 14:58:17 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-07-13 14:58:17 +0300 |
commit | e142ae77cadf04103fbc643f21cf60891862f6a8 (patch) | |
tree | 142e25fccd5ba3e748a1652706e7e4f1220ca289 /source/blender/editors/space_image/image_ops.c | |
parent | 107bbee4c763c95ea5d07a3b2f08bfe3b6adb24c (diff) |
Imbuf types refactor.
ImBuf types were getting stored as bitflags in a 32bit integer which had
already run out of space. Solved the problem by separating file type to
an ftype enum, and file specific options to foptions.
Reviewed by Campbell, thanks a lot!
Diffstat (limited to 'source/blender/editors/space_image/image_ops.c')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 72e3f21b1be..840bbff3973 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1469,12 +1469,11 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima, else { if (ima->source == IMA_SRC_GENERATED) { simopts->im_format.imtype = R_IMF_IMTYPE_PNG; + simopts->im_format.compress = ibuf->foptions.quality; } else { BKE_imbuf_to_image_format(&simopts->im_format, ibuf); - simopts->im_format.quality = ibuf->ftype & 0xff; } - simopts->im_format.quality = ibuf->ftype & 0xff; } simopts->im_format.planes = ibuf->planes; @@ -1619,6 +1618,7 @@ static void save_imbuf_post(ImBuf *ibuf, ImBuf *colormanaged_ibuf) * original one, so file type of image is being properly updated. */ ibuf->ftype = colormanaged_ibuf->ftype; + ibuf->foptions = colormanaged_ibuf->foptions; ibuf->planes = colormanaged_ibuf->planes; IMB_freeImBuf(colormanaged_ibuf); |