Repository navigation
[Feature] Aggressive Adoption of JPEG XL's Progressive Decoding Architecture #28423
Closed
ppskj178
started this conversation in
Feature Request
Replies: 3 comments 6 replies
|
jxl still has barely any browser support, so I think this would be far too premature. |
4 replies
|
I think for now we should close this as a dupe of #12945, once JXL is more mature and that request has been covered we can take a look at this again. |
1 reply
|
Your proposition goes against the philosophy of immich: Never touch the master. What could be done is consolidation thumbnails and previews into a single JPEG XL file. But the master should never be touched, according to Immich's philosophy – and I agree. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have searched the existing feature requests, both open and closed, to make sure this is not a duplicate request.
The feature
Regarding the JPEG XL format, after reviewing existing feature requests (such as #12945) and various documentation, it appears to be the ideal format for a photo management solution like Immich.
This proposal goes beyond simply requesting basic viewing support for specific files. Because it is a broader architectural suggestion and its technical feasibility or practical effectiveness within Immich haven't been fully verified yet, I am submitting this as a separate discussion.
For those unfamiliar, here is a video explaining progressive decoding from https://jpegxl.info/
https://jpegxl.info/alex-perez-uGXEEwnvIkQ-unsplash-vsnonprogressive-VP9.webm
Concept
Currently, Immich (along with many other photo management apps) generates multiple thumbnails tailored for different use cases per image. By aggressively leveraging the various features of JPEG XL, we could potentially handle all contexts using only a single master image.
Details
Let's use a 4K JPEG XL image as an example.
First, when viewing the full list in the mobile app, we can use the "Built-in Preview" (around 50px) to display the grid. (I assume the Built-in Preview is saved when the camera creates the
.jxlfile, but if not, a separate generation process might be needed.)Beyond that, we can serve all image sizes using only the master image.
By utilizing progressive decoding, we can adjust how much of the image is loaded based on the required size, effectively achieving the equivalent of a low-resolution thumbnail.
When viewing the timeline on the web or a single photo on mobile, a resolution of about 360p is typically needed. We can simply download a few percent of the master image and pause the transfer.
If a user zooms in on the image on mobile or clicks it on the web for a larger preview, we can resume the paused download to fetch the necessary data to reach the desired quality.
This stream flow continues until the full original file is eventually downloaded.
Additionally, if facial coordinates are stored, there is no need to crop and save individual face images. By utilizing the ROI (Region of Interest) decoding feature, we can instantly extract and display them directly from the master image.
Additional References
https://cloudinary.com/blog/how_jpeg_xl_compares_to_other_image_codecs
https://cloudinary.com/blog/introducing_fuif_responsive_images_by_design
https://cloudinary.com/blog/progressive_jpegs_and_green_martians
Platform
All reactions