Summary: | Add JPEG XL support in all bundles (AppImage, MacOS, Windows). | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | GamePad64 |
Component: | Plugin-DImg-QImage | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | caulier.gilles, dnovomesky, jose_oliver, metzpinguin |
Priority: | NOR | ||
Version: | 7.2.0 | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | https://invent.kde.org/graphics/digikam/commit/5c0b79b67ba2c360ba39d4f26adc2a1286e68a4a | Version Fixed In: | 7.7.0 |
Sentry Crash Report: |
Description
GamePad64
2021-05-03 12:44:50 UTC
https://en.wikipedia.org/wiki/JPEG_XL ==> indicate that ImageMagick support this format. As digiKam has a IM image loader, so the format can be already supported as well... Go to Setup/configure/Plugin/Image Loader page and look in the IM supported formats. Gilles Caulier libjxl source code on gitlab : https://gitlab.com/wg1/jpeg-xl I am guessing that this would be more an issue with exiv2. Would Digikam be able to read and write metadata to JPG XL files? Well, for metadata, in digiKam 7.3.0 we have introduced the ExifTool support. For the moment, we implement a parser and a process controller to run ExifTool to run the main operations with metadata. A ExifTool view have been added to Metadata viewer on the sidebar. This allow to compare and support non Exiv2 files and non Exif, Makernotes, Iptc, and Xmp tags. We do not plan to replace Exiv2 by ExifTool for performance reasons, but in special cases, ExifTool will be an helper, as to write to RAW and Video, and for ex to support modern image containers as JPEG XL. Here you can see a screenshot of ExifTool Viever operating on FITS astro photo file format (not supported by Exiv2 of course). https://imgur.com/QRHsGOE Gilles Caulier Oups sorry, wrong screen shot : https://i.imgur.com/SAIJrJB.png Git commit 5c0b79b67ba2c360ba39d4f26adc2a1286e68a4a by Gilles Caulier. Committed on 19/01/2022 at 02:57. Pushed by cgilles into branch 'master'. Fix compilation with older Jasper library JPEG XL is now offcialy supported by ImageMagick codecs and KImageFormat Qt plugins. FIXED-IN: 7.6.0 M +9 -9 core/dplugins/dimg/README M +4 -3 core/dplugins/dimg/jpeg2000/dimgjpeg2000loader_load.cpp https://invent.kde.org/graphics/digikam/commit/5c0b79b67ba2c360ba39d4f26adc2a1286e68a4a digiKam-7.6.0-Win64.exe doesn't open JXL files yet. Can we add libjxl? So that ImageMagick or the Qt plug-in in kimageformats will be built with JPEG XL support. I would suggest to add libavif+libaom so AVIF will work out of box too (via kimageformats). Git commit 8ce1e287cfa2dcb8ac7d6f86c3e61355453024f7 by Gilles Caulier. Committed on 07/03/2022 at 13:56. Pushed by cgilles into branch 'qt5-maintenance'. add libjpegXL as 3rd party library for KF5::KImageFormat module M +1 -0 project/bundles/3rdparty/CMakeLists.txt A +82 -0 project/bundles/3rdparty/ext_libjxl/CMakeLists.txt https://invent.kde.org/graphics/digikam/commit/8ce1e287cfa2dcb8ac7d6f86c3e61355453024f7 Git commit 96492950811668ff984dd88dc2ebf3581769f902 by Gilles Caulier. Committed on 07/03/2022 at 14:43. Pushed by cgilles into branch 'qt5-maintenance'. add patch to only build libjxl core M +19 -9 project/bundles/3rdparty/ext_libjxl/CMakeLists.txt A +78 -0 project/bundles/3rdparty/ext_libjxl/jxl-lib-only.patch https://invent.kde.org/graphics/digikam/commit/96492950811668ff984dd88dc2ebf3581769f902 To dnovomesky from comment #7 For libavif+libaom dependencies to add in the bundles, please open a separated wish in bugzilla, as there is a possible conflict between ImageMagick codecs, KImageFormats, and libheif. This last one is also able to use these libraries... Gilles Caulier Git commit 6ffb48d13b14c0a1ea9c8c7f447983ba6ed6772e by Gilles Caulier. Committed on 07/03/2022 at 15:02. Pushed by cgilles into branch 'qt5-maintenance'. Libjxl: use right patch file name and compile in source code M +5 -3 project/bundles/3rdparty/ext_libjxl/CMakeLists.txt M +0 -18 project/bundles/3rdparty/ext_libjxl/jxl-lib-only.patch https://invent.kde.org/graphics/digikam/commit/6ffb48d13b14c0a1ea9c8c7f447983ba6ed6772e AppImage is now patch with JXL support : ... -- extracting... src='/d/kimageformats-5.90.0.tar.xz' dst='/b/ext_kf5_frameworks/ext_kimageformats-prefix/src/ext_kimageformats' -- extracting... [tar xfz] -- extracting... [analysis] -- extracting... [rename] -- extracting... [clean up] -- extracting... done [ 0%] No update step for 'ext_kimageformats' [ 50%] No patch step for 'ext_kimageformats' [ 50%] Performing configure step for 'ext_kimageformats' -- The C compiler identification is GNU 8.4.0 -- The CXX compiler identification is GNU 8.4.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- -- Installing in the same prefix as Qt, adopting their path scheme. -- Looking for __GLIBC__ -- Looking for __GLIBC__ - found -- Performing Test _OFFT_IS_64BIT -- Performing Test _OFFT_IS_64BIT - Success -- Performing Test HAVE_DATE_TIME -- Performing Test HAVE_DATE_TIME - Success -- Performing Test BSYMBOLICFUNCTIONS_AVAILABLE -- Performing Test BSYMBOLICFUNCTIONS_AVAILABLE - Success fatal: ni ceci ni aucun de ses répertoires parents n'est un dépôt git : .git -- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.1") -- Found OpenEXR: /usr/lib64/libIlmImf.so (found version "2.3.0") -- Could NOT find libavif (missing: libavif_DIR) -- Checking for module 'libjxl>=0.6.1' -- Found libjxl, version 0.6.1 -- Checking for module 'libjxl_threads>=0.6.1' -- Found libjxl_threads, version 0.6.1 -- The following features have been enabled: * LibJXL, required for the QImage plugin for JPEG XL images -- The following OPTIONAL packages have been found: * Qt5Core (required version >= 5.15.2) * KF5Archive Required for the QImage plugin for Krita and OpenRaster images * Qt5Widgets (required version >= 5.15.3) * Qt5PrintSupport (required version >= 5.15.2) Required for the QImage plugin for EPS images * OpenEXR, A library for handling OpenEXR high dynamic-range image files, <https://www.openexr.com/> Required for the QImage plugin for OpenEXR images -- The following REQUIRED packages have been found: * ECM (required version >= 5.90.0), Extra CMake Modules., <https://commits.kde.org/extra-cmake-modules> * Qt5Gui (required version >= 5.15.2) -- The following features have been disabled: * LibHeif, required for the QImage plugin for HEIF/HEIC images -- The following OPTIONAL packages have not been found: * libavif (required version >= 0.8.2) Required for the QImage plugin for AVIF images -- Configuring done -- Generating done -- Build files have been written to: /b/ext_kf5_frameworks/ext_kimageformats-prefix/src/ext_kimageformats-build [100%] Performing build step for 'ext_kimageformats' [ 3%] Automatic MOC for target kimg_jxl ... [ 7%] Built target kimg_jxl_autogen ... Consolidate compiler generated dependencies of target kimg_jxl ... [ 35%] Built target kimg_jxl ... [ 48%] Linking CXX shared module ../../bin/imageformats/kimg_jxl.so ... Install the project... -- Install configuration: "RelWithDebInfo" ... -- Installing: /usr/plugins/imageformats/kimg_jxl.so -- Installing: /usr/share/kservices5/qimageioplugins/jxl.desktop ... [100%] Completed 'ext_kimageformats' Now recompiling digiKam 7.7.0 pre-release AppImage target, please wait... Gilles Git commit 5bb3d7ebc6951f723de85c35748e31fd2b1dd89c by Gilles Caulier. Committed on 07/03/2022 at 15:11. Pushed by cgilles into branch 'qt5-maintenance'. Add JXL as supported type-mime M +2 -1 core/libs/database/coredb/coredbschemaupdater.cpp https://invent.kde.org/graphics/digikam/commit/5bb3d7ebc6951f723de85c35748e31fd2b1dd89c Windows cross compiling : [ 0%] Performing download step (verify and extract) for 'ext_kimageformats' CMake Warning at ext_kimageformats-stamp/verify-ext_kimageformats.cmake:15 (message): File will not be verified since no URL_HASH specified -- extracting... src='/mnt/data/7.x/project/bundles/mxe/temp.dwnld/kimageformats-5.90.0.tar.xz' dst='/mnt/data/7.x/project/bundles/mxe/temp.build/ext_kf5_frameworks/ext_kimageformats-prefix/src/ext_kimageformats' -- extracting... [tar xfz] -- extracting... [analysis] -- extracting... [rename] -- extracting... [clean up] -- extracting... done [ 50%] No update step for 'ext_kimageformats' [ 50%] No patch step for 'ext_kimageformats' [100%] Performing configure step for 'ext_kimageformats' CMake Warning at /mnt/data/7.x/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.shared/share/cmake/mxe-conf.cmake:13 (message): ** Warning: direct use of toolchain file is deprecated ** Please use prefixed wrapper script instead: x86_64-w64-mingw32.shared-cmake [options] <path-to-source> - uses mxe supplied cmake version 3.22.1 - loads toolchain - loads common run results - sets various policy defaults Call Stack (most recent call first): /mnt/data/7.x/project/bundles/mxe/build.win64/usr/x86_64-pc-linux-gnu/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake:124 (include) CMakeLists.txt:3 (project) -- The C compiler identification is GNU 9.4.0 -- The CXX compiler identification is GNU 9.4.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/gilles/Documents/7.x/project/bundles/mxe/build.win64/usr/x86_64-pc-linux-gnu/bin/x86_64-w64-mingw32.shared-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /home/gilles/Documents/7.x/project/bundles/mxe/build.win64/usr/x86_64-pc-linux-gnu/bin/x86_64-w64-mingw32.shared-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Installing in /mnt/data/7.x/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.shared. Run /mnt/data/7.x/project/bundles/mxe/temp.build/ext_kf5_frameworks/ext_kimageformats-prefix/src/ext_kimageformats-build/prefix.sh to set the environment for KImageFormats. -- Looking for __GLIBC__ -- Looking for __GLIBC__ - not found -- Performing Test HAVE_DATE_TIME -- Performing Test HAVE_DATE_TIME - Success -- Performing Test BSYMBOLICFUNCTIONS_AVAILABLE -- Performing Test BSYMBOLICFUNCTIONS_AVAILABLE - Success -- Found PkgConfig: /home/gilles/Documents/7.x/project/bundles/mxe/build.win64/usr/bin/x86_64-w64-mingw32.shared-pkg-config (found version "0.28") -- Found OpenEXR: /home/gilles/Documents/7.x/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.shared/lib/libIlmImf.dll.a (found version "2.2.0") -- Could NOT find libavif (missing: libavif_DIR) -- Checking for module 'libjxl>=0.6.1' -- Found libjxl, version 0.6.1 -- Checking for module 'libjxl_threads>=0.6.1' -- Found libjxl_threads, version 0.6.1 -- The following features have been enabled: * LibJXL, required for the QImage plugin for JPEG XL images -- The following OPTIONAL packages have been found: * Qt5Core (required version >= 5.15.2) * KF5Archive Required for the QImage plugin for Krita and OpenRaster images * OpenEXR, A library for handling OpenEXR high dynamic-range image files, <https://www.openexr.com/> Required for the QImage plugin for OpenEXR images -- The following REQUIRED packages have been found: * ECM (required version >= 5.90.0), Extra CMake Modules., <https://commits.kde.org/extra-cmake-modules> * Qt5Gui (required version >= 5.15.2) -- The following features have been disabled: * LibHeif, required for the QImage plugin for HEIF/HEIC images -- The following OPTIONAL packages have not been found: * libavif (required version >= 0.8.2) Required for the QImage plugin for AVIF images -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: CMAKE_FIND_PREFIX_PATH INSTALL_ROOT MXE_TOOLCHAIN ZLIB_ROOT -- Build files have been written to: /mnt/data/7.x/project/bundles/mxe/temp.build/ext_kf5_frameworks/ext_kimageformats-prefix/src/ext_kimageformats-build [100%] Performing build step for 'ext_kimageformats' [ 3%] Automatic MOC for target kimg_jxl ... [ 5%] Automatic MOC for target kimg_jxl ... [ 13%] Built target kimg_jxl_autogen ... ... [ 25%] Built target kimg_jxl_autogen ... [ 36%] Building CXX object src/imageformats/CMakeFiles/kimg_jxl.dir/kimg_jxl_autogen/mocs_compilation.cpp.obj ... [ 44%] Building CXX object src/imageformats/CMakeFiles/kimg_jxl.dir/jxl.cpp.obj ... [ 69%] Linking CXX shared module ../../bin/imageformats/kimg_jxl.dll ... [ 71%] Built target kimg_jxl ... [100%] Performing install step for 'ext_kimageformats' Consolidate compiler generated dependencies of target kimg_jxl ... [ 48%] Built target kimg_jxl ... Install the project... -- Install configuration: "RelWithDebInfo" -- Installing: /mnt/data/7.x/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.shared/lib/plugins/imageformats/kimg_jxl.dll -- Installing: /mnt/data/7.x/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.shared/bin/data/kservices5/qimageioplugins/jxl.desktop ... [100%] Completed 'ext_kimageformats' Git commit a5a9cffb493c1d3752a9a5f8a29be9b5488f32fd by Gilles Caulier. Committed on 07/03/2022 at 16:52. Pushed by cgilles into branch 'qt5-maintenance'. Enable libjxl to MXE build for Windows M +1 -0 project/bundles/mxe/01-build-mxe.sh https://invent.kde.org/graphics/digikam/commit/a5a9cffb493c1d3752a9a5f8a29be9b5488f32fd Git commit feef9f4e56d2a2a4981bffc532c8b5cd1f259eb4 by Gilles Caulier. Committed on 07/03/2022 at 16:54. Pushed by cgilles into branch 'qt5-maintenance'. Enable libjxl under Macports for MacOS build M +1 -0 project/bundles/macports/01-build-macports.sh https://invent.kde.org/graphics/digikam/commit/feef9f4e56d2a2a4981bffc532c8b5cd1f259eb4 Git commit c88939a16d3f1cf4624ff0e2381b493087e19dad by Gilles Caulier. Committed on 07/03/2022 at 19:37. Pushed by cgilles into branch 'qt5-maintenance'. ajust patch to compile libjxl under macports M +2 -2 project/bundles/3rdparty/ext_libjxl/CMakeLists.txt C +0 -0 project/bundles/3rdparty/ext_libjxl/jxl-lib-linux.patch [from: project/bundles/3rdparty/ext_libjxl/jxl-lib-only.patch - 100% similarity] R +15 -0 project/bundles/3rdparty/ext_libjxl/jxl-lib-macports.patch [from: project/bundles/3rdparty/ext_libjxl/jxl-lib-only.patch - 081% similarity] https://invent.kde.org/graphics/digikam/commit/c88939a16d3f1cf4624ff0e2381b493087e19dad 7.7.0 AppImage bundle pre-release is online with JXL support. https://files.kde.org/digikam/ Gilles Caulier Maik, Both KImageFormat and ImageMagick Codec supports JXF. KImageFormat must be the prefered way, as IM use a run-time solution based on JpegXL command line tools instead the library Gilles The digiKam KImageFormat loader already has a better priority (80) than the ImageMagick loader (90). Maik a yes perfect Gilles Git commit bc569ceb05bc5bcec129e362d54d48143577ec75 by Gilles Caulier. Committed on 08/03/2022 at 08:59. Pushed by cgilles into branch 'qt5-maintenance'. libjxl : Add patch for MXE and copy and move dll at the right place M +7 -2 project/bundles/3rdparty/ext_libjxl/CMakeLists.txt A +60 -0 project/bundles/3rdparty/ext_libjxl/jxl-lib-mxe.patch https://invent.kde.org/graphics/digikam/commit/bc569ceb05bc5bcec129e362d54d48143577ec75 JpegXL support in digiKam 7.7.0 AppImage Linux Bundle : https://i.imgur.com/bGIKQLR.png Maik, The problem with File/Export dialog under MacOS is back with 7.7.0. I cannot test if export to JXL is fine, even if the codec is present and can be used. Look well the message from Qt on the bottom of terminal : https://i.imgur.com/GZyoRvk.png Gilles JpegXL supports under Windows work as expected with next 7.7.0 : https://i.imgur.com/GQ5GZJK.png I observed one crash in Windows build: Unhandled exception at 0x000000000F9A7631 (libjxl.dll) in digikam.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. Testfile: https://github.com/libjxl/conformance/blob/master/testcases/noise/input.jxl I think the crash is related to AVX2 acceleration and it happens when mingw compiler is used. Known workaround it to build libjxl (especially highway submodule) with -DHWY_COMPILE_ONLY_SCALAR in CXXFLAGS. Similar case elsewhere: https://github.com/easymodo/qimgv/issues/295#issuecomment-860712777 Git commit 344855bb35ca1267529fb55d835727919b600257 by Gilles Caulier. Committed on 08/03/2022 at 09:52. Pushed by cgilles into branch 'master'. JpegXL support: sync git/master with qt5-maintenance branch M +1 -0 project/bundles/3rdparty/CMakeLists.txt A +99 -0 project/bundles/3rdparty/ext_libjxl/CMakeLists.txt A +60 -0 project/bundles/3rdparty/ext_libjxl/jxl-lib-linux.patch A +75 -0 project/bundles/3rdparty/ext_libjxl/jxl-lib-macports.patch A +60 -0 project/bundles/3rdparty/ext_libjxl/jxl-lib-mxe.patch M +1 -0 project/bundles/appimage/01-build-host.sh M +1 -0 project/bundles/macports/01-build-macports.sh M +1 -0 project/bundles/mxe/01-build-mxe.sh https://invent.kde.org/graphics/digikam/commit/344855bb35ca1267529fb55d835727919b600257 @dnovomesky Thanks for testing and the link. I will recompile libjxl with the flag. Please for the AVIF support, please create a new file in bugzilla, in the same component. Thanks in advance Gilles Caulier Git commit a57d1d1883990335a37f83bbe22f54a7f3b298a3 by Gilles Caulier. Committed on 08/03/2022 at 10:04. Pushed by cgilles into branch 'qt5-maintenance'. Add libjxl compilation flag under widowns to prevent crash with AVX2 acceleration. M +10 -0 project/bundles/3rdparty/ext_libjxl/CMakeLists.txt https://invent.kde.org/graphics/digikam/commit/a57d1d1883990335a37f83bbe22f54a7f3b298a3 Another issue is with animated JXL files. For example: https://github.com/libjxl/conformance/blob/master/testcases/animation_newtons_cradle/input.jxl I get "An error has occurred with the media player..." message The media player is QtAv, based on ffmpeg. Sound like the animated JXL is not yet supported well in ffmpeg. So, this issue is a UPSTREAM bug. Gilles Note: VLC, last stable version is not able to handle this JXL animation. So... Gilles Caulier (In reply to caulier.gilles from comment #24) > Maik, > > The problem with File/Export dialog under MacOS is back with 7.7.0. I cannot > test if export to JXL is fine, even if the codec is present and can be used. > Look well the message from Qt on the bottom of terminal : > > https://i.imgur.com/GZyoRvk.png > > Gilles Yes it is clear. I had changed something again due to a bug report. The problem is that depending on the platform and the original or native file dialog, we either have a non-empty QUrl list for Cancel or no accept status in MacOS. I think I have an idea for a workaround. Maik Maik, For info, when i tried JXL export from Image Editor, native file dialog option was turned on. Gilles With "Use file dialogs from system" option turned off, export for editor to JXL work as expected : https://i.imgur.com/J75wtWU.png Gilles Git commit fc125e54fa9a67bfb271b0bd5a4a1d4e8bde2d03 by Gilles Caulier. Committed on 10/03/2022 at 04:52. Pushed by cgilles into branch 'qt5-maintenance'. Same type-mime problem than AVIF for JPX, depending of Qt version Related: bug 109060 M +4 -1 core/libs/database/item/scanner/itemscanner_photo.cpp M +2 -1 core/libs/threadimageio/thumb/thumbnailcreator_engine.cpp https://invent.kde.org/graphics/digikam/commit/fc125e54fa9a67bfb271b0bd5a4a1d4e8bde2d03 To dnovomesky from comment #30 The file : https://github.com/libjxl/conformance/blob/master/testcases/animation_newtons_cradle/input.jxl Give no thumbnail. This is not relevant of ffmpeg/qtav backend, but directly by QImage jpx loader. Also this file cannot be loaded to image editor. Do you know if Qt jpx loader support animated container, at least to load first frame (as for gifa for ex). Gilles (In reply to caulier.gilles from comment #37) > To dnovomesky from comment #30 > > The file : > https://github.com/libjxl/conformance/blob/master/testcases/ > animation_newtons_cradle/input.jxl > > Give no thumbnail. This is not relevant of ffmpeg/qtav backend, but directly > by QImage jpx loader. > > Also this file cannot be loaded to image editor. > > Do you know if Qt jpx loader support animated container, at least to load > first frame (as for gifa for ex). > > Gilles I don't understand what is the problem. I am using your appimage build and the image opens also in the image editor: 188[.]121[.]162[.]14/jxl/digikam1.png The animation doesn't play in digiKam but it plays in gwenview. The JXL Qt plug-in supports JPEG XL animation. You are right, sorry for the noise. annimated JXL work as expected. only the preview with QtAV/ffmpeg do not work... Gilles |