Skip to content

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

Open
nickv2002 wants to merge 4 commits into
YACReader: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 into
YACReader:developfrom
nickv2002:feat/docker-kimageformats-v2

Conversation

@nickv2002
Copy link
Copy Markdown

@nickv2002 nickv2002 commented Feb 17, 2026

Description

Adds KDE kimageformats support to the Docker image by rebasing on Ubuntu 26.04 LTS (Resolute), which ships KF6 natively. This enables AVIF, JXL, HEIC, and 20+ additional image formats in YACReaderLibraryServer with no source builds required.

The key change

Ubuntu Noble (24.04) only ships KF5 — getting KF6 kimageformats required building ECM and kimageformats from source, adding significant build complexity. Ubuntu Resolute (26.04 LTS) ships kimageformat6-plugins 6.24.0 directly in apt, so it installs as a single runtime dependency alongside the existing packages.

Changes

  • Rebase on ghcr.io/linuxserver/baseimage-ubuntu:resolute (Ubuntu 26.04 LTS, Qt 6.10)
  • Add kimageformat6-plugins to the runtime apt install — that's it
  • Reorganize Dockerfile into a cleaner multi-stage build: sevenzip-builderyacreader-builderruntime
  • Fix COPY docker/root.tar.gz / path (build context is the repo root)

Supported Formats Added

AVIF / AVIFS — via libavif
JXL — via libjxl
HEIC / HEIF — via libheif (included in kimageformat6-plugins on Resolute)
Bonus formats — ani, bw, eps, hdr, ico, pcx, pic, psd, qoi, ras, rgb, tga, xcf, kra, ora, and more

Testing

  • ✅ Docker image builds successfully on Ubuntu 26.04 / Qt 6.10
  • ✅ AVIF and JXL formats recognized by YACReaderLibraryServer at startup
  • ✅ Test comics scanned successfully: avif.cbz, jxl.cbz, test_combined.cbz
  • ✅ RAR (CBR) support verified working
  • ✅ Production tested for several weeks

Notes

@nickv2002 nickv2002 force-pushed the feat/docker-kimageformats-v2 branch 2 times, most recently from d85787f to 1b480e6 Compare February 17, 2026 05:34
Comment thread docker/Dockerfile Outdated
@luisangelsm
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

What changes? Any downsides?

@nickv2002
Copy link
Copy Markdown
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
Copy Markdown
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.

@nickv2002
Copy link
Copy Markdown
Author

nickv2002 commented Feb 23, 2026

Ubuntu 26.04 is an LTS release and should be out in about 2 months. That should have built-in ECM 6.* and kimageformats 6.* in the standard apt library. Less work than some alternate repo and includes long term support.
I'll check back again then in a few months once that's out.

@nickv2002 nickv2002 force-pushed the feat/docker-kimageformats-v2 branch 2 times, most recently from 283e526 to 19edf75 Compare May 11, 2026 05:13
Comment thread docker/Dockerfile
libqt6sql6-sqlite && \
libqt6network6 \
libqt6sql6-sqlite \
kimageformat6-plugins && \
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, easy to add lots of new formats!

Comment thread docker/Dockerfile Outdated
@nickv2002
Copy link
Copy Markdown
Author

@luisangelsm @selmf - check out these changes. Now building off of Ubuntu Resolute instead of Noble (that's 26.04 instead of 24.04) so we can pull in the latest image formats as a plug-in from apt without needing to build anything. Most of the diff here is just to put the 7Zip build in its own build step for parallelism + build speed.

LMK and can port these changes over to the ARM64 image too.

@luisangelsm
Copy link
Copy Markdown
Member

luisangelsm commented May 11, 2026

Thanks for the update @nickv2002

CI is failing. I think it's the docker/root.tar.gz change.

nickv2002 and others added 2 commits May 11, 2026 21:59
…rmats

Upgrade the Docker image from Ubuntu Noble (24.04) to Ubuntu Resolute
(26.06 LTS), adopt the cmake build system, and add support for AVIF,
JXL, HEIC, and 20+ additional image formats via kimageformat6-plugins.

Changes from upstream develop:
- Base: ghcr.io/linuxserver/baseimage-ubuntu:resolute (Ubuntu 26.06 LTS)
  with Qt 6.10 — avoids Noble's backport packaging complexity
- Multi-stage build: separate sevenzip-builder and runtime stages keep
  the final image lean
- RAR support: 7z.so is still built from source (YACReader/yacreader-7z-deps)
  in a dedicated sevenzip-builder stage and copied into the runtime image;
  apt 7zip-rar alone does not provide the same RAR codec behavior
- kimageformat6-plugins: available directly from Ubuntu Resolute apt
  (KF6 6.24.0) — no source build required; brings AVIF (libavif16),
  JXL (libjxl0.11), HEIC (libheif), WebP, and more
- Package updates for Resolute: libqt6network6 (was libqt6network6t64),
  removed libqt6opengl6-dev and libunarr-dev (not available on Resolute)
- Fix COPY root.tar.gz path to docker/root.tar.gz to match build context

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…text

Upstream builds with the docker/ directory as the build context, so
root.tar.gz is referenced without the docker/ prefix.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@luisangelsm luisangelsm force-pushed the feat/docker-kimageformats-v2 branch from 58e6ae6 to 1363642 Compare May 11, 2026 19:59
@luisangelsm
Copy link
Copy Markdown
Member

@nickv2002 CI passes now, so you can update the arm64 Dockerfile.

nickv2002 and others added 2 commits May 11, 2026 14:21
Mirror the amd64 changes onto the arm64 image: rebase both stages
onto ghcr.io/linuxserver/baseimage-ubuntu:resolute (Ubuntu 26.04),
drop the noble-era t64 package suffixes for libqt6gui6/libqt6network6,
and add kimageformat6-plugins to the runtime stage for AVIF/JXL.

Verified natively on arm64: image builds, server starts on Qt 6.10.2,
kimg_avif.so/kimg_jxl.so load, and avif.cbz / jxl.cbz pages render
end-to-end through the HTTP API.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Mirror the amd64 layout: extract the 7z.so build into a dedicated
sevenzip-builder stage that fetches the prebuilt source archive, so
yacreader-builder no longer reaches into the cloned tree to compile
RAR support. The two builder stages now share a 'base' image and run
in parallel.

After this change docker/Dockerfile and docker/Dockerfile.aarch64 are
byte-identical. Verified natively on arm64: 7z.so is present in the
final image and avif.cbz / jxl.cbz pages render end-to-end.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@nickv2002
Copy link
Copy Markdown
Author

nickv2002 commented May 11, 2026

@luisangelsm I updated this PR include the same updates for the arm64 Dockerfile as the x86_64 file. I built the ARM version on my M-series Mac and used it to serve some of the same JXL/AVIF/etc sample comics I used for x86_64 testing. Worked fine.


Follow-up: opened #540 to consolidate Dockerfile.aarch64 into the shared Dockerfile.

After the last commit here (refactor(docker): Split 7zip build into its own stage for aarch64) the two Dockerfiles are byte-identical — same resolute base (a multi-arch manifest), same package lists, same multi-stage layout. #540 deletes the duplicate and points the existing docker-arm64 CI job at the shared file with --platform linux/arm64 (mirroring the explicit --platform linux/amd64 already on the amd64 job). The two-job-plus-manifest-combine CI structure is unchanged, so multi-arch publishing keeps working.

Kept separate from this PR because the scope is different: this PR is "make arm64 work on resolute + AVIF/JXL" (functional), #540 is "remove the now-redundant duplicate file" (cleanup). #540 is stacked on this branch and needs to merge after this one.

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