diff options
Diffstat (limited to 'source/blender/imbuf/intern/openexr')
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 20 | ||||
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.h | 4 |
2 files changed, 10 insertions, 14 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 8f001c9031f..882808cbc14 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -75,7 +75,7 @@ _CRTIMP void __cdecl _invalid_parameter_noinfo(void) { } #endif - +} #include "BLI_blenlib.h" #include "BLI_math_color.h" #include "BLI_threads.h" @@ -84,17 +84,13 @@ _CRTIMP void __cdecl _invalid_parameter_noinfo(void) #include "BKE_image.h" #include "IMB_allocimbuf.h" +#include "IMB_colormanagement.h" +#include "IMB_colormanagement_intern.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" #include "IMB_metadata.h" #include "openexr_multi.h" -} - -extern "C" { -#include "IMB_colormanagement.h" -#include "IMB_colormanagement_intern.h" -} using namespace Imf; using namespace Imath; @@ -1602,8 +1598,8 @@ static ExrHandle *imb_exr_begin_read_mem(IStream &file_stream, for (lay = (ExrLayer *)data->layers.first; lay; lay = lay->next) { for (pass = (ExrPass *)lay->passes.first; pass; pass = pass->next) { if (pass->totchan) { - pass->rect = (float *)MEM_mapallocN(width * height * pass->totchan * sizeof(float), - "pass rect"); + pass->rect = (float *)MEM_callocN(width * height * pass->totchan * sizeof(float), + "pass rect"); if (pass->totchan == 1) { echan = pass->chan[0]; echan->rect = pass->rect; @@ -1938,12 +1934,12 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem, IMB_metadata_ensure(&ibuf->metadata); for (iter = header.begin(); iter != header.end(); iter++) { - const StringAttribute *attrib = file->header(0).findTypedAttribute<StringAttribute>( + const StringAttribute *attr = file->header(0).findTypedAttribute<StringAttribute>( iter.name()); /* not all attributes are string attributes so we might get some NULLs here */ - if (attrib) { - IMB_metadata_set_field(ibuf->metadata, iter.name(), attrib->value().c_str()); + if (attr) { + IMB_metadata_set_field(ibuf->metadata, iter.name(), attr->value().c_str()); ibuf->flags |= IB_metadata; } } diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h index df03d0d205f..b0835e5082e 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.h +++ b/source/blender/imbuf/intern/openexr/openexr_api.h @@ -24,12 +24,12 @@ #ifndef __OPENEXR_API_H__ #define __OPENEXR_API_H__ +#include <stdio.h> + #ifdef __cplusplus extern "C" { #endif -#include <stdio.h> - void imb_initopenexr(void); void imb_exitopenexr(void); |