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/util.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/util.c')
-rw-r--r--source/blender/imbuf/intern/util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 8863097a8ba..bbfa41e9dcc 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -45,6 +45,7 @@
#include "IMB_targa.h"
#include "IMB_png.h"
#include "IMB_bmp.h"
+#include "IMB_radiance_hdr.h"
#include "IMB_anim.h"
@@ -95,6 +96,10 @@ static int IMB_ispic_name(char *name)
}
if (imb_is_a_png(buf)) return(PNG);
if (imb_is_a_targa(buf)) return(TGA);
+
+ /* radhdr: check if hdr format */
+ if (imb_is_a_hdr(buf)) return(RADHDR);
+
/*
if (imb_is_a_bmp(buf)) return(BMP);
*/
@@ -123,6 +128,7 @@ int IMB_ispic(char *filename)
if (G.have_quicktime){
if( BLI_testextensie(filename, ".jpg")
|| BLI_testextensie(filename, ".jpeg")
+ || BLI_testextensie(filename, ".hdr")
|| BLI_testextensie(filename, ".tga")
|| BLI_testextensie(filename, ".rgb")
|| BLI_testextensie(filename, ".bmp")
@@ -145,6 +151,7 @@ int IMB_ispic(char *filename)
} else { // no quicktime
if( BLI_testextensie(filename, ".jpg")
|| BLI_testextensie(filename, ".jpeg")
+ || BLI_testextensie(filename, ".hdr")
|| BLI_testextensie(filename, ".tga")
|| BLI_testextensie(filename, ".rgb")
|| BLI_testextensie(filename, ".bmp")