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

PNG: a very small percentage of images decoded incorrectly #84

Closed
Shnatsel opened this issue Feb 7, 2023 · 3 comments
Closed

PNG: a very small percentage of images decoded incorrectly #84

Shnatsel opened this issue Feb 7, 2023 · 3 comments

Comments

@Shnatsel
Copy link
Contributor

Shnatsel commented Feb 7, 2023

The results from a test run on the manebooru.art database are in.

There are no decode failures other than ERROR [zune_bin] Could not complete workflow, reason png: Error decoding idat chunks Output limit exceeded, set limit was 1073741824 and output size is 107374185 which appears to be legitimate.

However, there are some discrepancies in decoding compared to imagemagick on a total of 70 images out of 600,000. This should hopefully be a representative sample: https://mega.nz/file/tslC1azb#CBg56O8T7uwC1uXBnbcQLjSaYiQALtaCz_b97hXDm3Y

Tested on commit 15e5d6c. The run on 600,000 images was done on an earlier commit, but I've re-tested everything on the specified commit, which is the latest as of this writing.

@etemesi254
Copy link
Owner

etemesi254 commented Feb 8, 2023

You have images with 1GB output size for dimensions?

That's a 16384 * 16384 RGBA image to say the least.

I should allow such settings to be tweaked in the command line though

etemesi254 added a commit that referenced this issue Feb 8, 2023
…ill always finish without hitting limits.

Fixes a part of  #84

Signed-off-by: caleb <etemesicaleb@gmail.com>
@Shnatsel
Copy link
Contributor Author

Shnatsel commented Feb 8, 2023

You have images with 1GB output size for dimensions?

One out of 600,000 images, yes.

etemesi254 added a commit that referenced this issue Feb 12, 2023
Flags some images in #84

Signed-off-by: caleb <etemesicaleb@gmail.com>
etemesi254 added a commit that referenced this issue Feb 16, 2023
The if's fail for some weird reasons so imma remove them for now.

Fixes error at #84

Signed-off-by: caleb <etemesicaleb@gmail.com>
@etemesi254
Copy link
Owner

A summary is that.

There was a bug on tRNS expansion, it's now corrected.

Most of these images are APNG (ffprobe will tell you imagemagick's identify won't), I am yet to add support for that.

You will get a warning on encountering APNG files informing you that you will only get the first frame (another cool thing was that we gained --probe abilities in the command line).

I don't think there are any further errors on PNG but I am not satisfied with some things i.e bit depth expansion, and some allocations we can avoid. I'm going to spend some time fixing those ones and will ping when I'm satisfied with speed and memory use.

etemesi254 added a commit that referenced this issue Oct 21, 2023
…ill always finish without hitting limits.

Fixes a part of  #84

Signed-off-by: caleb <etemesicaleb@gmail.com>
etemesi254 added a commit that referenced this issue Oct 21, 2023
Flags some images in #84

Signed-off-by: caleb <etemesicaleb@gmail.com>
etemesi254 added a commit that referenced this issue Oct 21, 2023
The if's fail for some weird reasons so imma remove them for now.

Fixes error at #84

Signed-off-by: caleb <etemesicaleb@gmail.com>
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

2 participants