imagemagickblenderopenexr

How do I convert EXR to PNG and adjust brightness at the same time


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?


Solution

  • 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