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/imbuf/IMB_colormanagement.h | |
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/imbuf/IMB_colormanagement.h')
-rw-r--r-- | source/blender/imbuf/IMB_colormanagement.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h index 5d0ab5e57d4..7126d1bcc8b 100644 --- a/source/blender/imbuf/IMB_colormanagement.h +++ b/source/blender/imbuf/IMB_colormanagement.h @@ -45,6 +45,7 @@ struct rcti; struct PartialBufferUpdateContext; struct wmWindow; struct Scene; +struct ImageFormatData; struct ColorSpace; struct ColorManagedDisplay; @@ -90,15 +91,17 @@ void IMB_colormanagement_imbuf_assign_float_space(struct ImBuf *ibuf, struct Col void IMB_colormanagement_imbuf_make_display_space(struct ImBuf *ibuf, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings); +struct ImBuf *IMB_colormanagement_imbuf_for_write(struct ImBuf *ibuf, int save_as_render, int allocate_result, + const struct ColorManagedViewSettings *view_settings, + const struct ColorManagedDisplaySettings *display_settings, + struct ImageFormatData *image_format_data); + /* ** Public display buffers interfaces ** */ unsigned char *IMB_display_buffer_acquire(struct ImBuf *ibuf, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, void **cache_handle); unsigned char *IMB_display_buffer_acquire_ctx(const struct bContext *C, struct ImBuf *ibuf, void **cache_handle); -void IMB_display_buffer_to_imbuf_rect(struct ImBuf *ibuf, const struct ColorManagedViewSettings *view_settings, - const struct ColorManagedDisplaySettings *display_settings); - void IMB_display_buffer_transform_apply(unsigned char *display_buffer, float *linear_buffer, int width, int height, int channels, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, int predivide); |