Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lossless isn't lossless #6

Open
navjack opened this issue Aug 6, 2019 · 2 comments
Open

Lossless isn't lossless #6

navjack opened this issue Aug 6, 2019 · 2 comments

Comments

@navjack
Copy link

navjack commented Aug 6, 2019

Converting an image (png) to avif with lossless results in lost color information. There are less total colors in the image after the conversion process back to png.

The original PNG has 166,426 total colors
The AVIF appears to have 52,720 total colors

The process I used to do this was

e:\avif-win-x64.exe -e "C:\Users\jackm\Downloads\materialball\material ball iray dimond material_rgb.png" -o "C:\Users\jackm\Downloads\materialball\material ball iray dimond material_rgb.avif" --lossless

and then

e:\avifdec.exe "C:\Users\jackm\Downloads\materialball\material ball iray dimond material_rgb.avif" "C:\Users\jackm\Downloads\materialball\material ball iray dimond material_rgb.y4m"

and then I used YUView to save the y4m file as a png in order for xnviewmp/irfanview to count the colors.

here are the files for you:

The Source Image:
The Source Image

The AVIF as a PNG:
The AVIF as a PNG

@Kagami
Copy link
Owner

Kagami commented Aug 6, 2019

That's probably due to RGB -> YCbCr 4:2:0 conversion step. I need to implement loading Y4M source files, that way you should have bit exact Y4M after decoding AVIF.

@bryc
Copy link

bryc commented Apr 20, 2022

Came here to report this issue. AVIF.io's lossless mode also isn't lossless. Only Paint.net is saving lossless properly so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants