Python resize JPG and save as EXR

Hello devs,

What would be the best library to do image resize and conversion? I need to resize JPG files and save them as EXR. Python 2.7.16

Tried imageio, did not work:

import imageio

src = 'C:/temp/render_01.JPG'
new = 'C:/temp/render_02.exr'

original = imageio.imread(src)
imageio.imsave(new, original)

Got an error:

  File "C:\Python27\lib\site-packages\imageio\core\", line 226, in get_writer
    "Could not find a format to write the specified file " "in mode %r" % mode
ValueError: Could not find a format to write the specified file in mode 'i'

It works if a new file is jpg, but then the original.resize() gives another error, so I was thinking there maybe some other ways exists.

Are you missing an exr plugin for imageio?

I found an SO post which contained an answer saying that the user had to download a separate binary.
So I searched the imageio docs for exr and found this page with links to plugins that provide exr support.

1 Like