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:
authorAntony Riakiotakis <kalast@gmail.com>2015-06-10 19:38:23 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-06-10 19:38:23 +0300
commit080cf9332bc9d71e0e14326bc8efdf06b738dea1 (patch)
treee8531a509dca4d8253aa19d89edc68152421f9e5 /source/blender/imbuf/intern/writeimage.c
parent6d495cc4ef071171ff0686b2be898a41e05b8051 (diff)
parent9676642cc94599b3419c9aaa5cf1aae2fbbd235f (diff)
Merge branch 'gooseberry' into temp_motionpathstemp_motionpaths
Conflicts: source/blender/blenkernel/intern/object.c
Diffstat (limited to 'source/blender/imbuf/intern/writeimage.c')
-rw-r--r--source/blender/imbuf/intern/writeimage.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c
index 087330d10d2..2f688803804 100644
--- a/source/blender/imbuf/intern/writeimage.c
+++ b/source/blender/imbuf/intern/writeimage.c
@@ -41,26 +41,14 @@
#include "IMB_colormanagement.h"
#include "IMB_colormanagement_intern.h"
-static ImBuf *prepare_write_imbuf(ImFileType *type, ImBuf *ibuf)
+static ImBuf *prepare_write_imbuf(const ImFileType *type, ImBuf *ibuf)
{
- ImBuf *write_ibuf = ibuf;
-
- if (type->flag & IM_FTYPE_FLOAT) {
- /* pass */
- }
- else {
- if (ibuf->rect == NULL && ibuf->rect_float) {
- ibuf->rect_colorspace = colormanage_colorspace_get_roled(COLOR_ROLE_DEFAULT_BYTE);
- IMB_rect_from_float(ibuf);
- }
- }
-
- return write_ibuf;
+ return IMB_prepare_write_ImBuf((type->flag & IM_FTYPE_FLOAT), ibuf);
}
short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags)
{
- ImFileType *type;
+ const ImFileType *type;
if (ibuf == NULL) return (false);
ibuf->flags = flags;
@@ -86,3 +74,19 @@ short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags)
return false;
}
+ImBuf *IMB_prepare_write_ImBuf(const bool isfloat, ImBuf *ibuf)
+{
+ ImBuf *write_ibuf = ibuf;
+
+ if (isfloat) {
+ /* pass */
+ }
+ else {
+ if (ibuf->rect == NULL && ibuf->rect_float) {
+ ibuf->rect_colorspace = colormanage_colorspace_get_roled(COLOR_ROLE_DEFAULT_BYTE);
+ IMB_rect_from_float(ibuf);
+ }
+ }
+
+ return write_ibuf;
+}