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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-09-25 12:42:24 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-09-25 12:42:24 +0400
commit90a5e8593c2c4effe80700ce70c4aa4334582278 (patch)
tree58bf4c3d7f49a4c80a1303c07e5dbcb6b93b9fd8 /source/blender/imbuf
parent3cf59bce789ecdb74a8806f73f88f14e0db1114d (diff)
Color Management: float generated images had is_data flag set incorrect
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/IMB_colormanagement.h1
-rw-r--r--source/blender/imbuf/intern/colormanagement.c23
2 files changed, 17 insertions, 7 deletions
diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h
index f6aaae716a8..f05973dd210 100644
--- a/source/blender/imbuf/IMB_colormanagement.h
+++ b/source/blender/imbuf/IMB_colormanagement.h
@@ -58,6 +58,7 @@ void IMB_colormanagement_validate_settings(struct ColorManagedDisplaySettings *d
struct ColorManagedViewSettings *view_settings);
const char *IMB_colormanagement_role_colorspace_name_get(int role);
+void IMB_colormanagement_check_is_data(struct ImBuf *ibuf, const char *name);
void IMB_colormanagement_assign_rect_colorspace(struct ImBuf *ibuf, const char *name);
/* ** Color space transformation functions ** */
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index 0f1a880fb75..c5d0b935784 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -1071,17 +1071,26 @@ const char *IMB_colormanagement_role_colorspace_name_get(int role)
return NULL;
}
+void IMB_colormanagement_check_is_data(ImBuf *ibuf, const char *name)
+{
+ ColorSpace *colorspace = colormanage_colorspace_get_named(name);
+
+ if (colorspace->is_data)
+ ibuf->colormanage_flag |= IMB_COLORMANAGE_IS_DATA;
+ else
+ ibuf->colormanage_flag &= ~IMB_COLORMANAGE_IS_DATA;
+}
+
void IMB_colormanagement_assign_rect_colorspace(ImBuf *ibuf, const char *name)
{
ColorSpace *colorspace = colormanage_colorspace_get_named(name);
- if (colorspace) {
- ibuf->rect_colorspace = colorspace;
- if (colorspace->is_data)
- ibuf->colormanage_flag |= IMB_COLORMANAGE_IS_DATA;
- else
- ibuf->colormanage_flag &= ~IMB_COLORMANAGE_IS_DATA;
- }
+ ibuf->rect_colorspace = colorspace;
+
+ if (colorspace->is_data)
+ ibuf->colormanage_flag |= IMB_COLORMANAGE_IS_DATA;
+ else
+ ibuf->colormanage_flag &= ~IMB_COLORMANAGE_IS_DATA;
}
/*********************** Threaded display buffer transform routines *************************/