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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
iSKUNK!

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

Post 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.
Post Reply