Color Management: image buffer loading reworked
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 14 Sep 2012 14:36:47 +0000 (14:36 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 14 Sep 2012 14:36:47 +0000 (14:36 +0000)
commitd7f55cff20ff31e80d95c7837e9b45205dea273f
tree4b497900c6d43380c1996f8e15800b8d30905606
parent58da4a1760028dbf4b7f0df78ed3d897ba5690c2
Color Management: image buffer loading reworked

Before this color space settings in image/movie clip data blocks
defined space in which loaded image buffer is, based on whether
this buffer contains float or byte buffer. This didn't work well
for formats like 16bit PNG, which are in fact non-linear formats
but were represented in Blender as float buffers.

Now image buffer loader is responsible to set up input default
color space for image/movie clip data blocks, which could be
based on format itself only or on particular file properties.

This means image/movie clip data blocks' input colorspace will
be initialized at time first image buffer is loaded.

This also resolves old confusing thing with image buffer's profile
flag, which in could have been non-linear for image buffer which
contained float buffer only -- this happened in mentioned case of
16 bit PNG format, i.e. Now float buffer would always be linear
which should make it easier to get rid of image buffer's profile.
40 files changed:
source/blender/blenkernel/BKE_image.h
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/ocean.c
source/blender/blenkernel/intern/sequencer.c
source/blender/collada/ImageExporter.cpp
source/blender/editors/interface/interface_icons.c
source/blender/editors/render/render_preview.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_image/image_ops.c
source/blender/imbuf/IMB_colormanagement.h
source/blender/imbuf/IMB_imbuf.h
source/blender/imbuf/intern/IMB_anim.h
source/blender/imbuf/intern/IMB_colormanagement_intern.h
source/blender/imbuf/intern/IMB_filetype.h
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/bmp.c
source/blender/imbuf/intern/cineon/cineon_dpx.c
source/blender/imbuf/intern/colormanagement.c
source/blender/imbuf/intern/dds/dds_api.cpp
source/blender/imbuf/intern/dds/dds_api.h
source/blender/imbuf/intern/filetype.c
source/blender/imbuf/intern/indexer.c
source/blender/imbuf/intern/iris.c
source/blender/imbuf/intern/jp2.c
source/blender/imbuf/intern/jpeg.c
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/imbuf/intern/openexr/openexr_api.h
source/blender/imbuf/intern/png.c
source/blender/imbuf/intern/radiance_hdr.c
source/blender/imbuf/intern/readimage.c
source/blender/imbuf/intern/targa.c
source/blender/imbuf/intern/thumbs.c
source/blender/imbuf/intern/tiff.c
source/blender/imbuf/intern/writeimage.c
source/blender/makesrna/intern/rna_image_api.c
source/blender/makesrna/intern/rna_sequencer_api.c
source/blender/render/intern/source/pipeline.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_playanim.c