Building ImageMagick with 32bit EXR support

Hi there,
I am trying to build ImageMagick with support for 32bit EXR files. Unfortunately enabling the Q32 option enables 32 bit only for ImageMagick in general but EXR still only supports 16 bit float.
When converting any image to EXR, the -depth flag is ignored an the result is always 16bit.

I don’t see any option for 32bit in the \ImageMagick-7.0.9-14\VisualMagick\exr\Config.txt file.

Does anyone know how I could get ImageMagic to compile with 32bit EXR support?
Using Windows 10 and VisualStudio.

Cheers, Florian

This might be a limitation on the source side:

Yes, there are more topics like that one where it is mentioned that the EXR support in ImageMagick is only 16bit float.

I was wondering if anyone has an idea on how to compile ImageMagick with a 32bit capable EXR version.

Or maybe someone can recommend another CLI tool for reading and writing EXR files on Windows. I only know of djv_convert which unfortunately handles the alpha channel wrong. And the img2tiledexr tool that comes with V-Ray which only writes tiled EXRs. Tiled EXRs are not well suited for compositing.

What are you trying to achieve? Convert other formats to EXR? You can give oiiotool a go. It comes with openimageio.

Thanks, I’ll take a look at oiiotool.

I want to convert EXR images to EXRs with a different bit depth and / or compression.
We are rendering with V-Ray Maya. Unfortunately V-Ray does not allow us to specify different EXR options per AOV. So we usually render everything as 32bit float. This is quite slow for comp and also uses a lot of disc space. E.g. I want to convert beauty passes to 16bit float with DWAA compression.

There’s always the dreaded Photoshop scripting
Sorry, don’t mean to scare anyone.

Photoshop notoriously treats EXRs off-spec. This may have been resolved but i would never trust it for EXRs heh.

@Behr : What version of VRay are you using and are you sure this is still the case? Since quite a few releases when rendering in 16bit half channels that need to be 32bit are kept 32bit by VRay automatically in Max. This affects depth, and SamplerInfo in Point mode. Everything else does not really benefit from 32bit float. As it also supports saving scanline EXRs these days and custom header attributes we are not really using post processing (except for stitching split renderjobs) anymore. (We are rendering a lot of deep, but still heh).

Photoshop is completely unaware of the fact that EXR supports different bit depth and compression methods. There are plugins for better EXR support. But I don’t think those can be used with a script in a way that is needed here.

We are using 4.3 aka V-Ray Next Update 2. I saw that the Max Version supports scanline but that option is missing from the Maya GUI. I also think that V-Ray uses the correct depth for stuff like wpp when saving to a multi exr but not when saving individual files. But I have to test that again.

oiiotools looks very promising. Fast and supports all EXR features I need. Just need to find a way to compile it for Windows.

You may want to give vcpkg a try it might take a bit of the pain out of this (and similar) ventures on windows:

Yes, vcpkg is great. Unfortunately it does not build OIIOtools by default and other features like Python are disabled. When I set -DOIIO_BUILD_TOOLS=ON, the build fails.

This seems to be a known bug ( Investigating how to solve this now.