A friend was convering a 545 MB TIFF to JXl in Affinty and got a 81 MB. We both assumed that when Affinity said "100% Quality" export it meant Lossless. Now I think it means "visually lossless", i.s.lossy.
Lossless with XnConvert was 368 MB. I tried a variety of combinations for 99% to 95% quality and compression from 1-10 in XnConvert and found that XnConvert was giving simliar sizes to Affinity when 95% to 96% quality was used, specifically 96% was 77MB at 1 and 86MB at 10. He said on his Apple Max Studio M4 Max with 128GB it took him about 20 seconds to export the TIFF. I get not disimilar results with Quality 90% and compresion 7 on a 12th Gen Intel(R) Core(TM) i7-1260P 2.10 GHz with 64GB (Intel NUC from 2022).
When I research this on the web, I get this answer: "Affinity's 100% Quality setting is not technically lossless. While it aims to preserve as much image quality as possible, it typically uses lossy compression methods, which can result in some loss of data and quality."That seems correct to me.
My friend understandably equates "Quality = 100%" with lossless.
While every file conversion is unique and no general rule can confidently be applied using just one example. So got the Affinity 7 day trial and test the 100% quality on 30 other TIFF that I had already converted with XnConvert. In each case the Affinty 100% Quality was yielding compressions similar to XnConvert 97% compression 2.
So I am thinking to tell my friend that as visually satisfying as the Affinity Quality=100% maybe he shouldn't be lulled into the sense it is actually lossless.
I have thought to convert back and forth between TIFF and JXL to empirically verify that Afffinity is not truly lossless. I think that would be the acid test.
I just need a batch converter. XnConvert is ideal for me. He works 100 hours on one image. So, it should matter to him if his format is lossless or not. Though I think wisely he probably works in TIFF and only makes the final conversion to JXL at the end. At least I hope so.
TIFF--> JXL -Comparing Affinty "100% Quality" to XnConvert Lossless. No comparison?
Moderators: helmut, XnTriq, xnview
Re: TIFF--> JXL -Comparing Affinty "100% Quality" to XnConvert Lossless. No comparison?
I have done three rounds of converting TIFF to JXL, then JXL to TIFF. Each time I take the proceeding output file and use it for the other format.
The results are in...
With XnConvert, no matter how many times one takes one format and convert it to the other. Then takes that output and converts it back to the former format, the size in each format remains constant.
With Affinity (a fine program with many wonderful features) this is not the case. Going from TIFF to JXL 100% Quality bounces around. Each successive round of conversion from TIFF to JXL, and that output JXL to TIFF, etc. results in a different size file. It may very well be the case that each iteration is "visually lossless", but I think I can say definitely that the JXL export function in Affinity does not implement the JXL lossless standard.
The ISO/IEC JXL standard calls for the use of the following techniques to achieve a Lossless output:
1. Prediction
2. Residual coding
3. Entropy coding, such as context-adaptive binary arithmetic coding (CABAC)
4. Block-based processing
5. Lossless transformations prior to encoding
6. Flexible bit depth supporting high dynamic range to be compressed without loss of quality.
I think somewhere -- and likely for uinderstandable for speed and the customer experience -- Affinity has opted to implement a "100% Quality" export function rather than a true, standards-defined JXL Lossless format.
The numbers for those interested are:
XnConvert goes between a consistent 368,392kb JXL ouput files to 558,004kb TIFF using LZW+Predictor. I can't quite recreate the source TIFF compression of 545,856kb which using EXIFTools, I have found to be Adobe Deflate. This doesn't matter. The sizes are similar. And importantly, both are lossless.
JXL in XnConver each round:
368,392kb-->368,392kb-->368,392kb
It didn't seem to make sense to exceed three rounds. XnConvert was cycling between TIFF and JXL Lossless as expected. No loss of information.
Affinity rouind trips ()TIFF-->JXL; JXL-->TIFF) show a very minor, but consistently shrinking TIFF with each cycle:
492,462kb--> 483,504kb--> 481,965kb.
This "shrinkage" is also seen in the JXL files:
81,174kb-->80,913kb-->80,847kb.
If anyone is interested. The original image was a 1975 slide taken with a iPhone 16 Pro in macro mode, handheld at 1/72 sec, then expanded with Gigapixel 6x, then processed using Affinity. I was just trying to see if there was a way to use my iPhone instead of buying a scanner.
I hope no one considers my two posts off-topic. I have been searching for a Batch TIFF-to-JXL converter that preserves metadata (EXIF, IPTC, XMP) and XnConvert is coming out on top. My only question was triggered by my friend challenging me about whther JXL Lossless was correctly implement as his Affinity was getting smaller JXL file for what he thought was a lossless export. In fact, I think I've demostrated that "100% Quality" JXL export in Affinity is not lossless. That is the sole motivation for this exercise.
I last contact with digital photography was in 1997-2001, when JPEG 2000 was being considered as a commerical standard. It didn't become popular. I am hoping JXL does become a success. My initial reaction is very positive.
The results are in...
With XnConvert, no matter how many times one takes one format and convert it to the other. Then takes that output and converts it back to the former format, the size in each format remains constant.
With Affinity (a fine program with many wonderful features) this is not the case. Going from TIFF to JXL 100% Quality bounces around. Each successive round of conversion from TIFF to JXL, and that output JXL to TIFF, etc. results in a different size file. It may very well be the case that each iteration is "visually lossless", but I think I can say definitely that the JXL export function in Affinity does not implement the JXL lossless standard.
The ISO/IEC JXL standard calls for the use of the following techniques to achieve a Lossless output:
1. Prediction
2. Residual coding
3. Entropy coding, such as context-adaptive binary arithmetic coding (CABAC)
4. Block-based processing
5. Lossless transformations prior to encoding
6. Flexible bit depth supporting high dynamic range to be compressed without loss of quality.
I think somewhere -- and likely for uinderstandable for speed and the customer experience -- Affinity has opted to implement a "100% Quality" export function rather than a true, standards-defined JXL Lossless format.
The numbers for those interested are:
XnConvert goes between a consistent 368,392kb JXL ouput files to 558,004kb TIFF using LZW+Predictor. I can't quite recreate the source TIFF compression of 545,856kb which using EXIFTools, I have found to be Adobe Deflate. This doesn't matter. The sizes are similar. And importantly, both are lossless.
JXL in XnConver each round:
368,392kb-->368,392kb-->368,392kb
It didn't seem to make sense to exceed three rounds. XnConvert was cycling between TIFF and JXL Lossless as expected. No loss of information.
Affinity rouind trips ()TIFF-->JXL; JXL-->TIFF) show a very minor, but consistently shrinking TIFF with each cycle:
492,462kb--> 483,504kb--> 481,965kb.
This "shrinkage" is also seen in the JXL files:
81,174kb-->80,913kb-->80,847kb.
If anyone is interested. The original image was a 1975 slide taken with a iPhone 16 Pro in macro mode, handheld at 1/72 sec, then expanded with Gigapixel 6x, then processed using Affinity. I was just trying to see if there was a way to use my iPhone instead of buying a scanner.
I hope no one considers my two posts off-topic. I have been searching for a Batch TIFF-to-JXL converter that preserves metadata (EXIF, IPTC, XMP) and XnConvert is coming out on top. My only question was triggered by my friend challenging me about whther JXL Lossless was correctly implement as his Affinity was getting smaller JXL file for what he thought was a lossless export. In fact, I think I've demostrated that "100% Quality" JXL export in Affinity is not lossless. That is the sole motivation for this exercise.
I last contact with digital photography was in 1997-2001, when JPEG 2000 was being considered as a commerical standard. It didn't become popular. I am hoping JXL does become a success. My initial reaction is very positive.
Re: TIFF--> JXL -Comparing Affinty "100% Quality" to XnConvert Lossless. No comparison?
Just to give it the acid test I repeatedly saved, then opened and re-saved a JXL file with no edit as a JXL file in Affinity. Each time the size of the file was every so slight different. Strongly suggesting that the Affinity JXL routine does not meet the JPEG Committee (ISO/IEC JTC 1/SC 29/WG 1) Lossless standard. Otherwise, the size would be identical whether it was TIFF-->JXL or JXL-->JXL.
Sizes were: 80,847kb, 80,834kb, 80,864, 80,901kb. Nothing significant, but not identical.
Sizes were: 80,847kb, 80,834kb, 80,864, 80,901kb. Nothing significant, but not identical.