2

I was able to convert my EXR image to a PNG using the techniques outlined in Image conversion from IFF and EXR formats to JPEG format .

convert 0007.exr /tmp/0007.png

Unfortunately the PNG looks quite dim.

What should I add to the imagemagick convert command line to increase the brightness?

Community
  • 1
  • 1
Mutant Bob
  • 3,121
  • 2
  • 27
  • 52

3 Answers3

1

EXR is in linear RGB colorspace. You want to convert it to non-linear sRGB colorspace in Imagemagick as:

Input:

enter image description here

convert image.exr -set colorspace RGB -colorspace sRGB output.png

enter image description here

fmw42
  • 46,825
  • 10
  • 62
  • 80
0

Starting with this:

enter image description here

You could try -auto-gamma:

convert start.jpg -auto-gamma result.jpg

enter image description here

If the -auto-gamma overcooks the image for your liking, you could apply a percentage of it. So, here I clone the original image and apply auto-gamma to the clone but then only blend 80% back into the original because I feel auto-gamma overdoes it:

convert start.jpg \( +clone -auto-gamma \) \
   -define compose:args=80 -compose blend -composite result.jpg 

enter image description here


Or, another option, you could experiment with your particular images and maybe try using -modulate for the brightness, where 100% means "do nothing", so numbers over 100 increase the brightness:

convert start.jpg -define modulate:colorspace=LCHuv -modulate 160 result.jpg

enter image description here

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • 1
    It turns out the FINAL answer to the question I didn't know how to word yet was http://blender.stackexchange.com/questions/73084/what-parameters-to-imagemagick-will-convert-from-exr-to-png-that-matches-how-ble/73120#73120 – Mutant Bob Feb 07 '17 at 18:39
0

You can try -auto-level, which will take the minimal value and the maximal value of your picture and then stretches the values to the full range of values:

convert input.exr -auto-level output.jpg

Note that if you picture was too bright and this does not help, then it might be that your image is stored with 32 Bit, while ImageMagick is working with 16 Bit and no HDRI support. 32 Bit input is supported if convert --version either show Q32 as part of the version string or lists HDRI under features.

Depending on your operating system you might be able to install another variant of ImageMagick. For example, for Debian Buster we can use sudo apt list imagemagick* to see that the package imagemagick-6.q16hdri is available. Installing this package provides convert-im6.q16hdri, which allows reading 32 Bit EXR images.

Steohan
  • 476
  • 4
  • 6