.hdr.pfm
HDR and PFM files: what they are and how to open them
An HDR file is a high dynamic range image in the Radiance format: every pixel stores real light levels, from deep shadow to direct sun. Open it free in HDRView on any computer or browser, or in Universal File Opener on Android or Windows.
Drop your HDR file here
Opens on this device. Nothing is uploaded. Any other file works too.
What is an HDR file?
An .hdr image stores far more brightness than an ordinary JPEG’s 256 levels per channel, so it can be re-exposed later and used as light. You meet it most in 3D work, as environment maps that light a scene in Blender and other renderers.
Greg Ward created the format for Radiance, lighting simulation software developed at Lawrence Berkeley National Laboratory; Radiance 1.0 came out in January 1989. Its pixel encoding is called RGBE. A .pfm (Portable Float Map) file holds the same kind of data as plain 32-bit floating point numbers, modeled on the Netpbm formats.
Two facts explain most problems. No screen shows the whole range at once, so every viewer tone maps it, and two apps can show the same file brighter or darker. And .hdr is also the extension of ENVI and Analyze 7.5 header files, which hold no picture. A phone’s HDR photo is something else: a JPEG or HEIC with extra brightness data.
What is inside
The file starts with a text header: #?RADIANCE, lines such as FORMAT=32-bit_rle_rgbe and EXPOSURE, a blank line, then a resolution string such as -Y 1024 +X 2048: 1,024 rows of 2,048 pixels, top row first. Each pixel takes 4 bytes, a mantissa each for red, green and blue plus a shared exponent, covering about 77 orders of magnitude at 1% accuracy.
Rows are usually run-length compressed with each of the four components coded separately, which typically halves the size. A PFM file has a three-line header instead: PF for color or Pf for gray, the width and height, and a scale whose sign gives the byte order. Then come 4-byte floats, bottom row first.
studio.hdr#?RADIANCEidentifies the formatFORMAT=32-bit_rle_rgbe4 bytes per pixel, run-length codedEXPOSURE=1.0optional: a multiplier already applied(blank line)end of the header-Y 1024 +X 20481,024 rows of 2,048 pixels, top row firstscanline 1red, green, blue and exponent, coded apart…scanline 1024How to open an HDR file
Windows
- HDRViewFree and open source. Opens .hdr and .pfm with live exposure and gamma, pixel values and a histogram.
- BlenderFree. Opens .hdr images and uses them as an environment texture to light a 3D scene.
- Universal File Opener for WindowsOursOpens Radiance HDR and PFM images and saves a PNG, JPEG or BMP copy.
Mac
- HDRViewFree and open source. Shows the full range on an HDR display, with exposure and gamma controls.
- Krita 5.3 or laterFree. Opens and exports Radiance HDR, and exports OpenEXR for editing.
iPhone and iPad
- HDRView in SafariFree. The web version runs in Safari on iPhone and iPad and opens .hdr and .pfm files.
Android
- Universal File OpenerOursShows Radiance HDR and PFM images with a tone-mapped preview and converts a copy to PNG or JPEG.
In a browser
- HDRViewFree. Its web version opens .hdr and .pfm files in any modern browser, with exposure control.
Won’t open?
Windows Photos cannot open it
Windows has no built-in decoder for Radiance HDR or PFM. Use HDRView or Blender, both free, or Universal File Opener for Windows.
It looks too dark, too bright or washed out
Each viewer picks one exposure to fit your screen. Change it in HDRView: the shadow and highlight detail is still in the file.
A small .hdr file is not an image at all
It may be an ENVI or Analyze 7.5 header that describes a separate data file, often .img, from remote sensing or medical imaging. Keep the two together. A Radiance file starts with #?RADIANCE, an ENVI header with the word ENVI.
A PFM file opens upside down
PFM has no single specification. The common version stores rows bottom to top, while Photoshop’s stores them top to bottom. Flip the image vertically, or run pamflip -topbottom from Netpbm.
The PNG or JPEG copy lost the bright details
An 8-bit copy fixes one exposure and clips the rest. Keep the .hdr, and use OpenEXR when you need to edit with the full range.
Convert an HDR file
- To PNG or JPEG, on AndroidOpen the file in Universal File Opener, tap Edit, choose Convert to and pick PNG or JPEG. The copy is tone mapped to 8-bit color; the original stays as it was.
- To OpenEXROpen the .hdr in Krita 5.3 or later, choose File, Export and pick OpenEXR (.exr). Krita’s manual recommends EXR over Radiance HDR when you have the choice.
HDR files in our apps
Universal File Opener shows Radiance HDR and PFM images on Android and Windows. On Android the preview is tone mapped and you can convert a copy to PNG or JPEG; edits save 8-bit color, so keep the original.
All Android tools and limits for HDR files
- Decode and preview Radiance HDR (RGBE) and PFM float maps.
- Convert to PNG or JPEG, or save supported edits.
- The editor warns when a large image is reduced in resolution.
Limits
- The preview is tone-mapped, and edits reduce the image to 8-bit color. Preserve the source for HDR work.
Walkthrough: Edit and convert images on Android