Use JuicyPixels for RGBE and PNG image I/O, ditch homebrew RGBE and PPM I/O.