OpenEXR for python

1,623 views
Skip to first unread message

illunara

unread,
Mar 30, 2015, 5:42:06 AM3/30/15
to python_in...@googlegroups.com

Hi everybody
I want to write a quick python script, to convert every .exr file to .jpg by using OpenEXR
However i failed at first step, i can't compile its library, it keep complaining that's missing include header files.
I'm using python 2.7, MCSV 2008 and window 7
And thank for dropping by


Justin Israel

unread,
Mar 30, 2015, 6:02:02 AM3/30/15
to python_in...@googlegroups.com

I've never built Openexr on Windows so someone else will have to give you more details. But strangely that compile command specifies posix paths to standard include location (osx/linux/...)
Anyways, Openexr has dependencies on ilmbase, so you have to build and install those first.

It looks like there are precompiled windows binaries for openexr. Have you tried those first?
http://www.openexr.com/downloads.html


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5a280a80-547a-4dc8-b9b9-9ade5bf0e2e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tuan Nguyen

unread,
Mar 30, 2015, 6:42:10 AM3/30/15
to python_in...@googlegroups.com
Hi Justin
Actually i had downloaded the whole source code here but i don't really understand what to do with it.
OpenEXR pre-compiled is like a C++ library i think. It doesn't much help if i want to use OpenEXR with python, right?.

Michał Frątczak

unread,
Mar 30, 2015, 6:54:01 AM3/30/15
to python_in...@googlegroups.com

If you only need conversion it's easier to just use xnview/nconvert

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

Tuan Nguyen

unread,
Mar 30, 2015, 7:10:58 AM3/30/15
to python_in...@googlegroups.com
Hi Michal
Yes, it does, we can use photoshop, nuke too, but that's not what i intent to do

Justin Israel

unread,
Mar 30, 2015, 2:29:33 PM3/30/15
to python_in...@googlegroups.com

Yes compiling it from source yourself is trickier if you haven't done much compiling. You have to first build ilmbase successfully. Then you have to build openexr and tell it where ilmbase is. THEN you can build python bindings for openexr which link against the c++ libs.
When you download the precompiled c++ libs, that means you can jump to the part where you build python bindings against them. If you check the documentation it might show you how to point the python setup at the location of your openexr libs.


On Tue, 31 Mar 2015 12:10 AM Tuan Nguyen <cb.il...@gmail.com> wrote:
Hi Michal
Yes, it does, we can use photoshop, nuke too, but that's not what i intent to do

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

Mark Serena

unread,
Mar 30, 2015, 4:04:41 PM3/30/15
to python_in...@googlegroups.com
I have a script for batching to tga with openimageio but it can be changed to jpg. The module will work with win 7. Not what you're after but should work too

Mark Serena

unread,
Mar 30, 2015, 4:05:29 PM3/30/15
to python_in...@googlegroups.com

Michał Frątczak

unread,
Mar 30, 2015, 4:08:08 PM3/30/15
to python_in...@googlegroups.com

Python bindings are only for ilmbase so they won't help with opening exr files - you'd still need to code with c++

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

Tuan Nguyen

unread,
Mar 31, 2015, 1:53:56 PM3/31/15
to python_in...@googlegroups.com
Thank for sharing,Serena. That's very interesting

To Michal
They have guide to compile to python library, Justin said that's good to go too, it just that guide is for MacOs and Linux,

I have a workaround solution until figure out how to compile this library, using Maya's mental ray convert command. It can call outside by the command line as well and we all using Maya right now :)

Fredrik Averpil

unread,
Apr 1, 2015, 8:52:14 AM4/1/15
to python_in...@googlegroups.com
Tuan, would you mind sharing which converter executable that is, exactly?

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

Anthony Tan

unread,
Apr 1, 2015, 9:41:32 AM4/1/15
to python_in...@googlegroups.com
if we're talking external program, i'm guessing it's imf_copy?

Tuan Nguyen

unread,
Apr 1, 2015, 11:22:56 PM4/1/15
to python_in...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages