From c52170b4ed83a279af5d1a065d173969fe3d24cd Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 20 Nov 2005 14:32:07 +0000 Subject: 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. --- source/blender/src/writeimage.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/src/writeimage.c') diff --git a/source/blender/src/writeimage.c b/source/blender/src/writeimage.c index 0c0b716d211..d7e0fd234ca 100644 --- a/source/blender/src/writeimage.c +++ b/source/blender/src/writeimage.c @@ -51,6 +51,9 @@ int BIF_write_ibuf(ImBuf *ibuf, char *name) /* to be used for e.g. envmap, not rendered images */ if(G.scene->r.imtype== R_IRIS) ibuf->ftype= IMAGIC; + else if ((G.scene->r.imtype==R_RADHDR)) { + ibuf->ftype= RADHDR; + } else if ((G.scene->r.imtype==R_PNG)) { ibuf->ftype= PNG; } -- cgit v1.2.3