diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-05-26 21:04:51 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-05-26 21:04:51 +0400 |
commit | ce9ee99c076847490902ce2777dadf86aa1a2970 (patch) | |
tree | f416aa2c90781ea89b8d6d8fea39e9e1f97d3c90 /source | |
parent | de6af75d4d10c2f9b3321435cb669f75f471ff70 (diff) |
Fix #31538: Wrong colors after reloading file with exr image
Issue was caused by generated images had got no profile set (IB_PROFILE_NONE)
which confused OpenEXR saver (which makes sRGB conversion for profiles which
are not linear).
Actually this is much deeper issue which would require the whole color pipeline
workflow (which would happen at some point when currently urgent stuff is resolved),
but having correct profile set for generated images would still be helpful.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 797a2093729..80b192c7a42 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -592,10 +592,12 @@ static ImBuf *add_ibuf_size(unsigned int width, unsigned int height, const char if (floatbuf) { ibuf = IMB_allocImBuf(width, height, depth, IB_rectfloat); rect_float = (float *)ibuf->rect_float; + ibuf->profile = IB_PROFILE_LINEAR_RGB; } else { ibuf = IMB_allocImBuf(width, height, depth, IB_rect); rect = (unsigned char *)ibuf->rect; + ibuf->profile = IB_PROFILE_SRGB; } BLI_strncpy(ibuf->name, name, sizeof(ibuf->name)); |