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

Shifted rows on multiple images #7

Closed
Shnatsel opened this issue Nov 22, 2022 · 5 comments
Closed

Shifted rows on multiple images #7

Shnatsel opened this issue Nov 22, 2022 · 5 comments

Comments

@Shnatsel
Copy link
Contributor

The following image

kotenok_gaff_cat_tay_198

gets decoded like this

out

Here's an rchive with 92 more examples showing significant mismatch compared to imagemagick:
https://mega.nz/file/M90XCIwK#cyiSqTo3KhtGCm7Fw6RxKoKH4sfraHEzC6wGA2UqD-8

At least some of them show the same issue, but there may be other issues in there as well.

Tested on commit b923233

@Shnatsel
Copy link
Contributor Author

Here's the shell script I use for testing:

#!/bin/sh

set -e

input="$1"
output="$(mktemp --tmpdir result_XXXXXXXXXXXXX.ppm)"
trap "rm -f "$output"" EXIT

if ! yes | /home/shnatsel/Code/zune-image/target/release/zune --input "$input" --out "$output" >/dev/null 2>&1; then
    echo "Failed to decode $input" 1>&2
    exit 1
fi
similarity=$(compare -quiet -metric RMSE "$input[0]" "$output" /dev/null 2>&1) || true
echo "$similarity $input"

The compare command is part of imagemagick, make sure you have it installed.

@Shnatsel
Copy link
Contributor Author

And I have many more images showing mismatches compared to imagemagick, but I'm not sure how many distinct issues there actually are. I'll re-run the test once this batch is fixed.

@etemesi254
Copy link
Owner

Thank you for the corpus, will look into it

@Shnatsel Shnatsel changed the title Shifted rows (and possibly other issues) on multiple images Shifted rows on multiple images Nov 22, 2022
@Shnatsel
Copy link
Contributor Author

At a glance it seems all these images have the same issue.

@etemesi254
Copy link
Owner

Yea, it's probably a wrong stride calculation somewhere.

etemesi254 added a commit that referenced this issue Oct 21, 2023
Fixes: #7
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