Bug 438655 - Half-precision floating point TIFF is loaded without checking availability of OpenEXR
Summary: Half-precision floating point TIFF is loaded without checking availability of...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL: https://invent.kde.org/graphics/krita...
Keywords:
Depends on:
Blocks: 420996
  Show dependency treegraph
 
Reported: 2021-06-14 20:36 UTC by amyspark
Modified: 2021-06-25 18:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description amyspark 2021-06-14 20:36:21 UTC
SUMMARY

16-bit floating point TIFF files should be prevented from loading if OpenEXR is not available in the system. This is checked in the exporter for writing, but not in the reader/converter plugin.

STEPS TO REPRODUCE
1. Create a 16-bit floating point TIFF file.
2. Attempt to load it with Krita having been built without OpenEXR support.

OBSERVED RESULT

The file is expected to load, and it should show garbage.

EXPECTED RESULT

The file should not be loaded.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 amyspark 2021-06-14 20:58:16 UTC
Blocks bug 420996 because we need to know the actual data layout in order to unmultiply the alpha channel safely.
Comment 2 amyspark 2021-06-18 00:13:16 UTC
Fix added to merge request !907 (which already fixes 420996, and whose resolution depended on floating point being properly handled).
Comment 3 amyspark 2021-06-25 18:31:52 UTC
Git commit 3b5d6c9be4a0aba108ba1cbffd6dce411c72ab4f by L. E. Segovia.
Committed on 17/06/2021 at 23:40.
Pushed by lsegovia into branch 'master'.

TIFF: refactor to enable floating point support

M  +0    -2    plugins/impex/tiff/CMakeLists.txt
M  +9    -18   plugins/impex/tiff/kis_buffer_stream.cc
M  +1    -0    plugins/impex/tiff/kis_buffer_stream.h
M  +333  -218  plugins/impex/tiff/kis_tiff_converter.cc
M  +1    -0    plugins/impex/tiff/kis_tiff_converter.h
D  +0    -108  plugins/impex/tiff/kis_tiff_reader.cc
M  +238  -98   plugins/impex/tiff/kis_tiff_reader.h
M  +0    -12   plugins/impex/tiff/kis_tiff_writer_visitor.cpp
D  +0    -154  plugins/impex/tiff/kis_tiff_ycbcr_reader.cc
M  +148  -37   plugins/impex/tiff/kis_tiff_ycbcr_reader.h

https://invent.kde.org/graphics/krita/commit/3b5d6c9be4a0aba108ba1cbffd6dce411c72ab4f