You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AlwaysOrange example is an extreme case, but lazy formats are somewhat of a practical problem.
I am working on supporting the RGBE format used in HDR images. RGBE itself is not officially supported by TIFF, but it would be better to store RGBE32{T} as RGB{T}. https://kimikage.github.io/HDRColorTypes.jl/dev/#RGBE32-and-XYZE32
Of course, I don't think it is necessary to support every format.
In general, for color types where the specific storage format is unknown, it might be better to convert to a known color type.
At least, it is better to show an error or warning before generating a broken file.
The text was updated successfully, but these errors were encountered:
Thanks for the report @kimikage. I agree, we should definitely not silently fail. Our writing support is definitely much more primitive than our reading support and we don't have enough safety checks for mapping Julian types to TIFF compatible types. This is something we should rectify before v1.0.
Our writing strategy at the moment is quite primitive, we simply write each pixel to disk following the Julia structure of the data. E.g. I'm not surprised that RGB24 fails because we write it is a UInt32 to disk, but likely tell TIFF that it's a RGB{N0f8} on read leading to incorrect indexing. The proper solution is to have logic to map the complex Julian types to TIFF compatible structures. I'm actually not sure if TIFF has any structure analogous to the Julia RGB24 (correct me if I'm wrong here) and we should throw an error.
EDIT: I'm unlikely to have the bandwidth to fix this till the fall but I'm happy to review a PR.
Unfortunately, I do not have sufficient bandwidth either, but would like to address this issue in several steps.
One point I'm wondering, is it a bug fix (patch) or a breaking change, to show error or warning messages?
Perhaps PR #159 is the priority at this time.
Perhaps some of the following are known problems, but are not shown in the documentation or (broken) tests.
The
AlwaysOrange
example is an extreme case, but lazy formats are somewhat of a practical problem.I am working on supporting the RGBE format used in HDR images. RGBE itself is not officially supported by TIFF, but it would be better to store
RGBE32{T}
asRGB{T}
.https://kimikage.github.io/HDRColorTypes.jl/dev/#RGBE32-and-XYZE32
Of course, I don't think it is necessary to support every format.
In general, for color types where the specific storage format is unknown, it might be better to convert to a known color type.
At least, it is better to show an error or warning before generating a broken file.
The text was updated successfully, but these errors were encountered: