Page 2 of 2

Re: High-quality reduction of HDR images to 24-bit color

Posted: 2007-07-23T11:35:34-07:00
by magick
We choose the OpenEXR C interface simply because ImageMagick is designed to compile with a C compiler. If we include a C++ interface to OpenEXR it would mean we could not include OpenEXR support unless ImageMagick was compiled with a C++ compiler. Or perhaps we could support both methods and decide which one to use based on the __cplusplus preprocessor symbol. Another method would be to build a reader/writer for the EXR format directly into Magick++ which is C++ coder. Yet another method would be to write a delegate program that converts EXR into a format understood by ImageMagick and set the appropriate tag in the delegates.xml configuration file. You are welcome to try any of these methods and post your results here. If you find a reasonable solution we would consider adding it to the ImageMagick distribution in the future.

Re: High-quality reduction of HDR images to 24-bit color

Posted: 2007-07-23T14:40:56-07:00
by iSKUNK!
Magick++: If a reader/writer were to be added here, I don't see how it would be accessible from the standard command-line tools. My understanding is that this library is solely for the benefit of user-written C++ code.

Delegate program: I'd rather avoid this approach, as C vs. C++ doesn't seem like a strong justification for it.

I suppose the way would be to have both a (limited) coders/exr.c and a (full-featured) exr.cpp, plus some autotools magic that selects between the two depending on whether a C++ compiler is available. I don't much like the idea of having two forms of the EXR coder, but to continue to serve users lacking a C++ compiler, that seems to be the only option. I'll work on this.