Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2009-05-17 20:19:13 +0400
committerMartin Poirier <theeth@yahoo.com>2009-05-17 20:19:13 +0400
commit7eeb8ac01cea69fc8dbf3e4a58179b1026fc6198 (patch)
treebb1fda3f9be548369ebaa8742ba0129080257bb8 /source/blender/imbuf
parent351086dbb83fa42d393a8a4f64287c2b90e23d97 (diff)
Color proofing support with lcms (http://www.littlecms.com/).
Enable with WITH_LCMS (options have been added for scons). lcms is very common on linux package managers, so no need to add in extern (IMHO). Libs for windows can be added to /lib Code is mostly a proof of concept with hardcoded path for icc profile (taken from the lcms test suite). Adding this now to svn so it doesn't rot on my hard drive. People interested in pushing it forward should feel free to dig in the code or poke me about it.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/IMB_imbuf_types.h1
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h
index 3cc155af1ad..79da0cb1c41 100644
--- a/source/blender/imbuf/IMB_imbuf_types.h
+++ b/source/blender/imbuf/IMB_imbuf_types.h
@@ -83,6 +83,7 @@ typedef struct ImBuf {
int ftype; /**< File type we are going to save as */
unsigned int *cmap; /**< Color map data. */
unsigned int *rect; /**< pixel values stored here */
+ unsigned int *crect; /**< color corrected pixel values stored here */
unsigned int **planes; /**< bitplanes */
int flags; /**< Controls which components should exist. */
int mall; /**< what is malloced internal, and can be freed */
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index ad7b1dce2e0..b561f0a583d 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -93,6 +93,10 @@ void imb_freerectImBuf(struct ImBuf * ibuf)
{
if (ibuf==NULL) return;
+ if (ibuf->crect && ibuf->crect != ibuf->rect) {
+ MEM_freeN(ibuf->crect);
+ }
+
if (ibuf->rect) {
if (ibuf->mall & IB_rect) {
MEM_freeN(ibuf->rect);
@@ -102,6 +106,7 @@ void imb_freerectImBuf(struct ImBuf * ibuf)
imb_freemipmapImBuf(ibuf);
ibuf->rect= NULL;
+ ibuf->crect= NULL;
ibuf->mall &= ~IB_rect;
}