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:
Diffstat (limited to 'source/blender/imbuf/intern/radiance_hdr.c')
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index 03ed1bb8008..d45438e2853 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -43,6 +43,7 @@
#include "MEM_guardedalloc.h"
+#include "BLI_utildefines.h"
#include "BLI_fileops.h"
#include "imbuf.h"
@@ -212,6 +213,9 @@ struct ImBuf *imb_loadhdr(unsigned char *mem, size_t size, int flags, char color
if (ibuf == NULL) return NULL;
ibuf->ftype = RADHDR;
+ if (flags & IB_alphamode_detect)
+ ibuf->flags |= IB_alphamode_premul;
+
if (flags & IB_test) return ibuf;
/* read in and decode the actual data */
@@ -315,7 +319,9 @@ static int fwritecolrs(FILE *file, int width, int channels, unsigned char *ibufs
putc((unsigned char)(128 + cnt), file);
putc(rgbe_scan[beg][i], file);
}
- else cnt = 0;
+ else {
+ cnt = 0;
+ }
}
}
MEM_freeN(rgbe_scan);