Skip to content

Conversation

@nickv2002
Copy link
Owner

Summary

Simplifies PR YACReader#499 approach by replacing 3 separate image plugin builds with KDE's kimageformats framework, as requested by maintainers for a minimal diff.

Changes

  • Reduced complexity: 8 stages → 6 stages (25% reduction)
  • Single plugin builder: Replaced AVIF, JXL, and HEIC plugin builders with kimageformats
  • KDE framework: Built from https://invent.kde.org/frameworks/kimageformats
  • Compatibility patch: kimageformats 6.0.0 patched to work with Ubuntu Noble's Qt 6.4.2

Supported Formats

Modern formats:

  • AVIF (avif, avifs)
  • JPEG XL (jxl)

Bonus formats (30+):
ani, hdr, pcx, psd, psb, qoi, ras, rgb, rgba, sgi, sun, tga, xcf, and more

Not supported:

  • HEIC/HEIF (kimageformats 6.0.0 doesn't include these; would need Qt 6.5+)

Testing

Successfully tested with test comics on port 8086:

  • avif.cbz ✓ (1 page, 0.02MB)
  • jxl.cbz ✓ (1 page, 0.04MB)
  • test_combined.cbz ✓ (4 pages, 0.21MB)

Comparison to PR YACReader#499

Aspect PR YACReader#499 This PR
Build stages 8 6
Plugin builders 3 separate 1 unified
AVIF support
JXL support
HEIC/HEIF support
Extra formats - 30+
Maintenance Custom plugins KDE framework
Diff size Large Minimal

Trade-offs

Advantages:

  • Simpler, more maintainable approach
  • Uses established KDE framework
  • Smaller diff as requested
  • Many bonus image formats included

Disadvantages:

  • No HEIC/HEIF support (less common in comics)
  • Requires patching kimageformats for Qt 6.4

Next Steps

This is a draft PR for testing. If HEIC/HEIF support is essential, we can either:

  1. Keep one custom plugin builder for HEIC/HEIF alongside kimageformats
  2. Wait for Ubuntu to update Qt to 6.5+ and use newer kimageformats
  3. Proceed with PR Add Qt image plugins for AVIF, JXL, and HEIC/HEIF support (Docker) YACReader/yacreader#499's full approach instead

- Add multi-stage Docker build with 7 optimized stages
- Build and install Qt image plugins: qt-avif-image-plugin, qt-jpegxl-image-plugin, qt-heic-image-plugin
- Build libjxl 0.10.2 from source (required version not in Ubuntu noble)
- Use system packages for AVIF (libavif16) and HEIC (libheif1)
- No YACReader source code changes - uses Qt's dynamic plugin loading
- Improves build caching and reduces rebuild times

Enables support for modern image formats without code modifications,
following YACReader's Qt plugin architecture as suggested in YACReader#498
- Replace 3 separate image plugin builders (AVIF, JXL, HEIC) with single kimageformats build
- Reduce Dockerfile from 8 stages to 6 stages (25% reduction)
- Build kimageformats 6.0.0 from KDE frameworks (patched for Qt 6.4 compatibility)
- Support AVIF (avif, avifs) and JPEG XL (jxl) formats
- Add 30+ bonus image formats (PSD, QOI, XCF, HDR, etc.)
- Simplify build dependencies and maintenance
- Note: HEIC/HEIF support not included (kimageformats 6.0.0 limitation)

This provides a minimal diff alternative to PR YACReader#499 as requested by maintainers,
using well-maintained KDE framework instead of multiple custom plugin builds.
- Remove libheif-dev from kimageformats builder (HEIC/HEIF not supported in v6.0.0)
- Remove libheif1 from runtime dependencies
- Reduces build complexity and image size
- No functional change since HEIC/HEIF wasn't working anyway
- Step-by-step testing instructions
- Expected outputs and success criteria
- Known limitations (HEIC/HEIF not supported)
- Troubleshooting section
- Comparison with original PR YACReader#499 approach
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.

2 participants