diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-24 15:56:07 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-24 15:56:07 +0400 |
commit | 9e3e12fa4e2b9038314e3f2f690a908042b835fa (patch) | |
tree | 4f5178f7e7ff7b8ff6a6ebd74459621f146adaf2 /source/blender/editors/space_sequencer | |
parent | 5a5b37a4fadee5ce2c44b097a50986e0b70ca898 (diff) |
Proper fix for #32626: TIFF renders are limited to 8 bit even when we choose 16.
Color management would be applied on both of float and byte buffers on image
save in cases if file format doesn't require linear float buffer and if image
is saving as render result.
This solves both initial report issue and TODO marked in previous fix.
Also de-duplicated image buffer color managing code and gave some more
meaningful names for few functions. Also wrote documentation around this
function, so current assumptions about spaces should be clear enough.
Made regression tests by saving EXR/PNG images to all supported format and
rendering OpenGL/Normal animation, in all cases seems everything is fine,
but more tests for sure would be welcome.
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index f927e83cabe..c72bff12056 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -885,7 +885,10 @@ static ImBuf *sequencer_make_scope(Scene *scene, ImBuf *ibuf, ImBuf *(*make_scop ImBuf *display_ibuf = IMB_dupImBuf(ibuf); ImBuf *scope; - IMB_colormanagement_imbuf_make_display_space(display_ibuf, &scene->view_settings, &scene->display_settings); + if (display_ibuf->rect_float) { + IMB_colormanagement_imbuf_make_display_space(display_ibuf, &scene->view_settings, + &scene->display_settings); + } scope = make_scope_cb(display_ibuf); @@ -967,7 +970,10 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq if (!scopes->zebra_ibuf) { ImBuf *display_ibuf = IMB_dupImBuf(ibuf); - IMB_colormanagement_imbuf_make_display_space(display_ibuf, &scene->view_settings, &scene->display_settings); + if (display_ibuf->rect_float) { + IMB_colormanagement_imbuf_make_display_space(display_ibuf, &scene->view_settings, + &scene->display_settings); + } scopes->zebra_ibuf = make_zebra_view_from_ibuf(display_ibuf, sseq->zebra); IMB_freeImBuf(display_ibuf); } |