this post was submitted on 02 Sep 2024
220 points (98.2% liked)
Programming
17366 readers
398 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Someone made a fair point that having a format being both lossy and lossless is not necessarily a great idea. If you download a jpeg file you know it will be compressed, if you download png it will be lossless. Shifting through jxl files to check if it's lossy or not doesn't sound very fun.
All in all I'm a big supporter of jxl though, it's one of the only github repos I actively follow.
While I agree that it's somewhat bad that there is no distinction between lossless and lossy jxl in the file extension, I think it's really not a big deal compared to the present situation with jpg/png.
The reason being that if you download a png file you have no idea if its been converted from jpg, if it's a screenshot of a jpg, or if it's been subjected to lossy reencoding by a tool or a website upload process.
The only thing you can really do to try and see if the file you've downloaded has suffered encoding loss is to do an image search on it and see if there are any better quality versions out there. You'd do the exact same thing with a jxl file.
Functionally speaking, I don't see this as a significant issue.
JPEG quality settings can run a pretty wide gamut, and obviously wouldn't be immediately apparent without viewing the file and analyzing the metadata. But if we're looking at metadata, JPEG XL reports that stuff, too.
Of course, the metadata might only report the most recent conversion, but that's still a problem with all image formats, where conversion between GIF/PNG/JPG, or even edits to JPGs, would likely create lots of artifacts even if the last step happens to be lossless.
You're right that we should ensure that the metadata does accurately describe whether an image has ever been encoded in a lossy manner, though. It's especially important for things like medical scans where every pixel matters, and needs to be trusted as coming from the sensor rather than an artifact of the encoding process, to eliminate some types of error. That's why I'm hopeful that a full JXL based workflow for those images will preserve the details when necessary, and give fewer opportunities for that type of silent/unknown loss of data to occur.