I am writing to propose an enhancement to MusicBrainz’s cover art rescaling process. The introduction of the JPEGLI encoder, combined with Lanczos3 resampling and a 4:2:2 color subsampling at a quality setting of 75-80, offers substantial benefits. This enhancement will result in higher-quality images with smaller file sizes, maintaining backward compatibility with existing JPEG standards. This request aims to improve the user experience, especially for those utilizing the MusicBrainz Picard app.
Benefits:
1. Higher Quality with Smaller Sizes:
- JPEGLI provides a 35% improvement in compression ratios at high quality settings compared to traditional JPEG encoders. This means users can achieve the same image quality at significantly reduced file sizes.
- For example, a 1200px cover art image currently sized at 300 KB can be reduced to around 150 KB using JPEGLI, preserving quality while saving space.
2. Backward Compatibility:
- JPEGLI is fully compatible with the original JPEG standards, ensuring that the newly encoded images can be read by all existing JPEG viewers and applications without any issues.
3. Enhanced User Experience in MusicBrainz Picard:
- Embedding cover art into music files often results in increased file sizes. By using JPEGLI, users can embed high-quality cover art into their music files without significantly increasing the overall file size. This is particularly beneficial for users who convert FLAC files to smaller formats like Opus.
Technical Details:
-
Encoder: JPEGLI (libjxl/lib/jpegli at main · libjxl/libjxl · GitHub)
-
API and ABI compatible with libjpeg62.
-
Support for 16-bit unsigned and 32-bit floating point input buffers.
-
Advanced color space conversions and chroma subsampling performed in floating point precision.
-
Adaptive dead-zone quantization for better handling of noisy image parts.
-
Efficient compression of images with ICC profiles in XYB color space.
-
Resampling Algorithm: Lanczos3
-
Offers superior image quality compared to simpler algorithms like bilinear or nearest-neighbor interpolation.
-
The non-separable approach should be considered for its higher image quality despite its higher computational demands.
Space Savings Calculation Example:
- Consider 100 music files, each 3 MB in size, with a 300 KB cover art image.
- Total space for cover art: 100 files * 300 KB = 30,000 KB (29.30 MB).
- With JPEGLI, the cover art size reduces to 150 KB.
- New total space for cover art: 100 files * 150 KB = 15,000 KB (14.65 MB).
- Space saved: 30,000 KB - 15,000 KB = 15,000 KB (14.65 MB).
Conclusion:
Implementing JPEGLI with Lanczos3 resampling and 4:2:2 color subsampling at a 75-80 quality setting will significantly improve the quality and efficiency of cover art images in MusicBrainz. This will enhance the user experience, particularly for users of the MusicBrainz Picard app, by providing higher quality images at reduced file sizes while maintaining compatibility with existing JPEG standards.
You can test the new encoder with XnView or XL Converter