-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDR data not presented as floating point values #173
Comments
A PR fixing this would be welcome! |
I've recently written a pure-Julia TIFF parsing package (https://github.com/tlnagy/TIFF.jl) that can handle HDR images and returns Gray{Float} or RGB{Float} images. It's technically a WIP, but it would be great to have some feedback. |
From a quick glance it looks amazing. I am not an expert on TIFF (far from it), so I only have generic comments. (Is there a way to use GitHub commenting features on an existing repo?)
|
I just did a major refactor of the internals (tlnagy/TiffImages.jl@5804882) and
We can continue this discussion over TIFF.jl so we don't totally hijack this thread. EDIT: I should also note in fairness, access ops will be slower with TIFF.jl due to the lazy transformations. |
Also, @timholy I appreciate you taking the time to look at it! I've learned a ton from all your great packages, I owe a large part of my Julia-fu to them. |
Thanks @tlnagy! Really appreciate your steady efforts to improve our TIFF loading! |
Just a heads up, I now eagerly evaluate the final product so the drawback of the lazy evaluations is gone in Load benchmarking: TIFF.jl#10 PR vs ImageMagick.jl v1.1.6
|
While not a direct solution to this issue, I am attempting to handle the Radiance RGBE format directly. The plan started around 2021 but was suspended due to my personal reasons. |
ImageMagick offers the ability to read HDR image data and return float arrays with high dynamic range. Unfortunately, loading an HDR file with ImageMagick.jl, I only receive a 16-bit-quantized representation with clamped values. The specific format I tried, Radiance RGBE, supports color values with a shared exponent of up to 255, so the dynamic range is significantly higher than what 16 bit or even 32 bit integers offer. This format is of particular importance for high dynamic range environments used for physically based rendering.
This may be an issue with how the ImageMagick library was built, as there is an option to turn off proper HDR handling and use 16 bit instead. See ImageMagick HDR for details.
But even if that is the origin of the problem, the Julia wrapper does not even consider floating point representations as a possible outcome. The code only refers to 8, 16 or 32 bit integers as valid pixel depths.
Having this fixed would be great help for our Julia realistic rendering engine.
The text was updated successfully, but these errors were encountered: