forked from bartvdbraak/blender
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.
This commit is contained in:
parent
de6af75d4d
commit
ce9ee99c07
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user