HDR to PNG Converter

Author: Nathaniel Meyer
Website: http://www.nutty.ca


About

HDR2PNG is a command line tool to convert HDR images into 32 bpp PNG images. It is designed to
solve a number of problems.

1. HDR is not a supported file format in web browsers. Using it in WebGL would require you to manually
download the binary data from the web and then upload it to WebGL. By converting it to
PNG, you can use an image object to download the data and then upload the image object directly
to the video card. This will save you development time.

2. HDR uses a simple runlength encoding for compression. PNG's filter and deflate produces much smaller
files, thus reducing the size of your web app.


Usage

hdr2png input.hdr output.png

The first argument is the path + filename of the HDR image to convert. The second argument points to the
path + filename of the PNG file to create. If your path and/or filename contain spaces, don't forget to wrap
your arguments in quotes.

You can optionally use the included windows batch script to convert multiple HDR images. Simply copy all your
HDR images to the folder and run the script, or update the script and point to the location of your HDR images.