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:
authorTon Roosendaal <ton@blender.org>2005-11-20 17:32:07 +0300
committerTon Roosendaal <ton@blender.org>2005-11-20 17:32:07 +0300
commitc52170b4ed83a279af5d1a065d173969fe3d24cd (patch)
treec7bde0a344cfc7734e4214147bb925c216370ddc /source/blender/imbuf/intern/readimage.c
parent36a9ae941510a12d092e76ac1d2cf1d731d793d3 (diff)
Patch provided by Alfredo de Greef
This adds Radiance HDR image file support. So now at least we can save the 'fbuf' (4x32 bits float colors) in Blender. It doesn't change anything for internal support in imbuf for floa colors, so when reading .hdr files it still converts it to 32 bits RGBA. As an extra I've added that saving images with F3 now also adds the optional extension, when the F10 "Extensions" option is set. One important note; I don't know the proper license for the code, it was provided without... will await feedback from Alfredo about it. For now I've added the standard Blender GPL header.
Diffstat (limited to 'source/blender/imbuf/intern/readimage.c')
-rw-r--r--source/blender/imbuf/intern/readimage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index 4cae5cace16..166b1d6af81 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -50,6 +50,7 @@
#include "IMB_hamx.h"
#include "IMB_jpeg.h"
#include "IMB_bmp.h"
+#include "IMB_radiance_hdr.h"
#include "BKE_global.h"
#ifdef WITH_QUICKTIME
@@ -128,6 +129,9 @@ ImBuf *IMB_ibImageFromMemory(int *mem, int size, int flags) {
ibuf = imb_loadtarga((uchar *)mem, flags);
if (ibuf) return(ibuf);
+ ibuf = imb_loadhdr((uchar*)mem, size, flags);
+ if (ibuf) return (ibuf);
+
#ifdef WITH_QUICKTIME
#if defined(_WIN32) || defined (__APPLE__)
if(G.have_quicktime) {