what parameters to imagemagick will convert from EXR to PNG that matches how blender interprets the RGB values? When I take an EXR image rendered by blender and use imagemagick to convert it into a PNG

convert /var/tmp/blender/easter-eggs/vr360/0007.exr  /tmp/x


the resulting image is rather dark.  I have to use the -modulate option like

convert /var/tmp/blender/easter-eggs/vr360/0007.exr -modulate 200  /tmp/x.png


and even then looking at the PNG in gimp doesn't look the same as if I load the .EXR in blender's UV/Image editor.

Why do these two pieces of software disagree on how to interpret the values in the .EXR file, and what workflow should I use to convert .EXR to PNG on the command line?
The short answer is that EXR holds data. In the case of visual data, it is a convention that the visual RGB data is stored in a linearised format.

When encoded as a linearised format, there is no idea of what transfer function is embedded into the data. This means that the imager has to apply the proper transfer function that covers the proper range of data within the EXR.

If you are using the "Default" rendering view, which is the sRGB EOTF, you can identify the different transfer functions and have ImageMagick convert appropriately with something like:

convert myexr.exr -colorspace RGB -colorspace sRGB mynonlineartiff.tiff


If you are using any transfer function other than the sRGB EOTF, the process would require further effort, and in most cases, ImageMagick would be an unacceptable tool to harness. OpenImageIO and OpenColorIO would be more suitable.