Color management: add "Color Unpremultiply" option for images and render settings.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 30 Dec 2011 14:17:11 +0000 (14:17 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 30 Dec 2011 14:17:11 +0000 (14:17 +0000)
commitd7d856a23de2b6751a46632130f941a71377d134
tree67662eadc78a4145eba4f0a9e04655cb1adb9edb
parent424e09a2cec805aa67824385c16a1d267fb1022b
Color management: add "Color Unpremultiply" option for images and render settings.
For premultiplied alpha images, this makes any color space conversion for the image
or render output work on color without alpha multiplied in.

This is typically useful to avoid fringing when the image was or will be composited
over a light background. If the image will be composited over a black background on
the other hand, leaving this option off will give correct results.

In an ideal world, there should never be any color space conversion on images with
alpha, since it's undefined what to do then, but in practice it's useful to have
this option.

Patch by Troy Sobotka, with changes by me.
17 files changed:
release/scripts/startup/bl_ui/properties_render.py
source/blender/blenkernel/intern/image.c
source/blender/editors/include/BIF_glutil.h
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_preview.c
source/blender/editors/screen/glutil.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_node/space_node.c
source/blender/imbuf/IMB_imbuf_types.h
source/blender/imbuf/intern/divers.c
source/blender/makesdna/DNA_image_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_scene.c
source/blender/nodes/composite/node_composite_util.c
source/blender/nodes/composite/nodes/node_composite_image.c
source/blender/render/intern/source/pipeline.c