pointfreeco / swift-snapshot-testing

📸 Delightful Swift snapshot testing.
https://www.pointfree.co/episodes/ep41-a-tour-of-snapshot-testing
MIT License
3.79k stars 582 forks source link

Adding support for JPEG XL as the new default #897

Closed mackoj closed 2 months ago

mackoj commented 2 months ago

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 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).

Screenshot 2024-08-31 at 2 52 18 PM

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.

mbrandonw commented 2 months ago

Hi @mackoj, thanks for bring up this topic, but since it is not an issue with the library I am going to convert it to a discussion.