What do you think about migrating the default PNG format to JXL format for this lib ?
MacOS Sequoia add support for JPEG XL(.jxl) format and it's better that HEIC. I do think it could be a great new default for swift-snapshot-testing and we could provide a fallback for platforms that did not have it using the libjxl.
In my test my big snapshot when from 326.3mb to 4.1mb(98.74% size decrease).
What is JPEG XL
Using JPEG XL is advantageous in several scenarios, especially as its adoption grows. Here are some key reasons to consider using JPEG XL:
1. Efficient Compression
Smaller File Sizes: JPEG XL offers both lossy and lossless compression with significantly smaller file sizes compared to older formats like PNG and JPEG. This efficiency is particularly beneficial for web use, reducing bandwidth and improving load times.
2. High Image Quality
Preserves Detail: JPEG XL maintains excellent image quality, even at lower bitrates, making it ideal for high-resolution photos and graphics where quality is crucial.
3. Support for Transparency
Alpha Channels: Unlike traditional JPEG, JPEG XL supports transparency, which is essential for modern web and graphic design, allowing for images with varying levels of opacity.
4. Future-Proofing
HDR and Wide Color Gamut: JPEG XL supports HDR (High Dynamic Range) and extended color gamuts, making it suitable for future high-end displays and photographic needs.
5. Backward Compatibility
Seamless Transition: JPEG XL can embed original JPEG data, allowing for a smooth transition from older JPEG formats without losing compatibility or quality.
6. Faster Performance
Quick Encoding/Decoding: JPEG XL is designed for faster encoding and decoding, which is useful in performance-critical environments like web applications and mobile devices.
7. Versatility
One Format for All: JPEG XL can replace multiple image formats (JPEG, PNG, GIF) thanks to its versatility, reducing the need to use different formats for different purposes.
When Should You Use JPEG XL?
Web Development: For faster loading times and reduced bandwidth usage.
Photography: To maintain high quality while saving storage space.
Graphic Design: When working with images that require transparency and high color fidelity.
Archiving: For storing high-quality images with the option of lossless compression.
Future-Ready Projects: When preparing for HDR content and displays with wide color gamuts.
JPEG XL is a strong choice when you need efficient compression, high quality, and modern features like transparency and HDR support, making it suitable for a wide range of applications.
Hi,
What do you think about migrating the default PNG format to JXL format for this lib ?
MacOS Sequoia add support for JPEG XL(
.jxl
) format and it's better that HEIC. I do think it could be a great new default forswift-snapshot-testing
and we could provide a fallback for platforms that did not have it using the libjxl.In my test my big snapshot when from 326.3mb to 4.1mb(98.74% size decrease).
What is JPEG XL
Using JPEG XL is advantageous in several scenarios, especially as its adoption grows. Here are some key reasons to consider using JPEG XL:
1. Efficient Compression
2. High Image Quality
3. Support for Transparency
4. Future-Proofing
5. Backward Compatibility
6. Faster Performance
7. Versatility
When Should You Use JPEG XL?
JPEG XL is a strong choice when you need efficient compression, high quality, and modern features like transparency and HDR support, making it suitable for a wide range of applications.