Copyright © 2006 Gene Michael Stover. All rights reserved. Permission to copy, store, & view this document unmodified & in its entirety is granted.
I needed a program to convert image files in the OpenEXR format to files in the Portable Pixmap format.
So I wrote a program called exrtoppm. It resembles some of the other conversion programs which are part of the Netpbm suite of Portable (Bit, Gray, Pix)map programs. It is a command line program. I use it on Microsloth Winders; it should also work on unix-like systems, though I haven't compiled it there, much less used it.
This document includes the user documentation for the program, links to download the executalbe &/or the source code, installation instructions, & build instructions.
One of the source code files, getopt.c, is in the public domain. I downloaded it from the TEX User's Group web site.
All other files, both source & executable, are copyrighted by Gene Michael Stover & released under the terms of the GNU General Public License [1]. Here's a copy of the copyright notice & license agreement at the beginning of each source file:
Copyright (c) 2006 Gene Michael Stover. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
My exrtoppm program links with the OpenEXR library from Industrial Light & Magic. That library is covered by its own license.
This documentation, the document you are reading now, has its own copyright & is not released under the terms of the GNU General Public License.
exrtoppm
[-i input] [-o output]
exrtoppm.exe is a command line program which eats image files in the OpenEXR format & excretes image files in the Portable Pixmap (PPM) format.
The output is always in PPM ``plain'' format with 24 bits per pixel.
It performs
colour correction. I copied the colour
correction technique from the exrdisplay program which
is included in the
OpenEXR suite from
Industrial Light & Magic.
exrtoppm was created by Gene Michael Stover.
It uses an OpenEXR library from Industrial Light & Magic.
There's always one more bug.
The executable, full documentation, & source code are available at http://cybertiggyr.com/gene/exrtoppm/.
If you just want to run exrtoppm & you don't want to build it yourself, here is how you can install it.
I apologize for the shared libraries1. I tried linking with the static libraries for OpenEXR, but that gave me run time errors with some of the Standard C I/O functions. (fflush & setbuf are two such functions.) It works fine with the shared libraries, so that's how I'm distributing it. I don't know if the problem with static libraries had to do with how Industrial Light & Magic linked the OpenEXR library or with how I was linking it.
For Microsloth Winders on x86 (which is the only binaries I'm distributing for now), do this:
%windir%\system32, which
is usually C:\windows\system32.
%windir%\system32 directory, copy
these files from that openexr-1.4.0-vsnet2003.zip
distribution:
Half_dll.dll
Iex_dll.dll
IlmImf_dll.dll
IlmThread_dll.dll
Imath_dll.dll
I've neither compiled nor used exrtoppm on other operating systems, but here's how you'd install it in general if you did:
If you just want the executables, download them from the links in the bin directory, below.
If you want the source code so you can compile it yourself, create a subdirectory tree like the one below & download all of the files into it.
After downloading all of the source code files & creating the directories (even the ones which are empty before you compile), you can build all of the programs from the command line by CDing into the same directory with Makefile.w32 & then running build.bat.
On Microsloth Winders, you will probably have to edit the pathname in build.bat for your system.
exrtoppm requires the OpenEXR library at both compile time & run time.
Q: Why didn't you use the Netpbm library?
I tried to use the Netpbm library, but I ran into compilation problems. Basically, it's designed for a compile-time POSIX environment, & Microsloth Winders ain't that. You can download support libraries so that you can eventually compile Netpbm on Winders, but I was too lazy.
That's okay, though, because the Portable (Bit, Gray, Pix)map formats are so simple that it's really easy to write code which writes those types of files. So that's what I did.
The lesson learned was that the portable in Portable (Bit, Gray, Pix)map refers to the file format itself, not the library implementation. And that's fine.
Normally, most of my programming is on unix(-like) systems, so normally I'd be supplying a Makefile for unix & not for Winders. I specifically needed this program on Winders, so I wrote it there, & I'm too lazy to compile it on a unix(-like) system until I need it there.
That said, it should compile just fine on a unix(-like) system. It just takes a Makefile. Oh, & you must install the OpenEXR libraries on the system.
Gene Michael Stover 2008-04-20