Skip to content

feat(docker): Add KDE kimageformats for AVIF, JXL and additional image formats#505

Open
nickv2002 wants to merge 4 commits intoYACReader:developfrom
nickv2002:feat/docker-kimageformats-v2
Open

feat(docker): Add KDE kimageformats for AVIF, JXL and additional image formats#505
nickv2002 wants to merge 4 commits intoYACReader:developfrom
nickv2002:feat/docker-kimageformats-v2

Conversation

@nickv2002
Copy link

@nickv2002 nickv2002 commented Feb 17, 2026

Description

Adds KDE kimageformats support to the Docker image, enabling AVIF and JXL image format support in YACReaderLibraryServer, along with 20+ additional image formats (ani, hdr, pcx, psd, qoi, xcf, etc.).

Changes

  • Reorganize Dockerfile into multi-stage build (base, sevenzip-builder, kimageformats-builder, yacreader-builder, runtime)
  • Add kimageformats-builder stage for building KDE kimageformats 6.0.0 with ECM 6.0.0
  • Copy kimageformats plugins to both builder and runtime stages
  • Add runtime dependencies: libavif16 and libjxl0.7
  • Fix COPY path for root.tar.gz: COPY docker/root.tar.gz / (relative to build context root)

Supported Formats

New formats with this PR:

  • AVIF / AVIFS (libavif)
  • JXL (libjxl)

Bonus formats included:

  • ani, bw, eps, hdr, ico, pcx, pic, psd, qoi, ras, rgb, tga, xcf (and more)

Not supported in kimageformats 6.0.0:

  • HEIC/HEIF (requires kimageformats 6.1+, not available in Ubuntu 24.04 Noble)

Testing

  • ✅ Docker image builds successfully
  • ✅ AVIF and JXL formats recognized by Qt
  • ✅ Comics with AVIF/JXL covers properly scanned
  • ✅ 3 test comics processed successfully: avif.cbz, jxl.cbz, test_combined.cbz
  • ✅ HEIC/HEIF files gracefully skipped (not supported)

Notes

  • Build from source required: Both ECM 6.0.0 and kimageformats 6.0.0 must be built from KDE source because Ubuntu Noble only provides older KF5 framework versions (ECM 5.115.0). KF6 framework is required for AVIF/JXL support.
  • Path fix note: The COPY docker/root.tar.gz / uses the full path because docker build context is the repository root, and root.tar.gz is located in the docker/ subdirectory.
  • Dockerfile.aarch64 is NOT modified; ARM support can be addressed in a follow-up PR if this is approved

Comparison with PR #499

This approach uses KDE official kimageformats library instead of custom Qt plugin builds:

  • ✅ Smaller diff, easier to maintain
  • ✅ More formats supported (30+ vs 4)
  • ✅ Official upstream library
  • ❌ HEIC/HEIF not supported (would require newer kimageformats version)

- Split into 4 stages: base, sevenzip-builder, yacreader-builder, runtime
- Improved build separation and caching efficiency
- Separate 7zip build stage allows better parallelization
- No functional changes - pure refactoring
- Maintains all existing functionality
- Minimized whitespace diffs for clarity
@nickv2002 nickv2002 force-pushed the feat/docker-kimageformats-v2 branch from f0b2f2c to d85787f Compare February 17, 2026 05:18
- Add plugin-base stage for common plugin build dependencies
- Add kimageformats-builder stage for building KDE kimageformats 6.0.0
- Includes AVIF and JXL support (HEIC/HEIF not supported in this version)
- Copy plugins to both builder and runtime stages
- Minimized whitespace diffs for clarity
- Based on multi-stage optimization from previous commit
@nickv2002 nickv2002 force-pushed the feat/docker-kimageformats-v2 branch from d85787f to 1b480e6 Compare February 17, 2026 05:34
…geformats-builder

- Eliminate the intermediate plugin-base stage since it was only used once
- Merge all build dependencies directly into kimageformats-builder
- Maintains full functionality with cleaner Dockerfile structure
- Reduces total lines in Dockerfile from 203 to 192
@luisangelsm
Copy link
Member

@nickv2002 thanks! did you try to install kimageformat-plugins instead of building them? like adding kimageformat-plugins to the list of packages installed.

@nickv2002
Copy link
Author

nickv2002 commented Feb 17, 2026

@nickv2002 thanks! did you try to install kimageformat-plugins instead of building them? like adding kimageformat-plugins to the list of packages installed.

I tried the versions from apt but:

Build from source required: Both ECM 6.0.0 and kimageformats 6.0.0 must be built from KDE source because Ubuntu Noble only provides older KF5 framework versions (ECM 5.115.0). KF6 framework is required for AVIF/JXL support.

Could rebase the image on a different & newer distro but that would introduce other changes.

@luisangelsm
Copy link
Member

Could rebase the image on a different & newer distro but that would introduce other changes.

What changes? Any downsides?

@nickv2002
Copy link
Author

nickv2002 commented Feb 17, 2026

Could rebase the image on a different & newer distro but that would introduce other changes.

What changes? Any downsides?

That would require significantly reworking because the base docker image to a more leading edge version of alpine/fedora/arch. It also doesn't seem in keeping with your previously expressed interest in minimizing maintenance work and support burdens.

@selmf
Copy link
Member

selmf commented Feb 18, 2026

I think we could use a newer non-LTS Ubuntu base image.

There's also another option I have used before - the KDE Neon Distro is based on Ubuntu LTS (noble) and should have the latest Qt and kimageformats. We could add the apt/ppas and just use those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments