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

Test decoder output #25

Merged
merged 1 commit into from
Oct 15, 2019
Merged

Test decoder output #25

merged 1 commit into from
Oct 15, 2019

Conversation

birktj
Copy link
Member

@birktj birktj commented Feb 1, 2019

These tests are based on the assumption that the current decoder is
correct and are to make sure that future changes to the decoder
wont break it.

This will fix #24

These tests are based on the assumtion that the current decoder is
correct and are to make sure that future changes to the decoder
wont break it.
@HeroicKatora
Copy link
Member

HeroicKatora commented Oct 1, 2019

Since this has been open for a long time now I suppose it is a matter of confidence in the change? But there is already another accepted merge based on it. Reading the images in question with some known correct software (or convert with e.g. imagemagick) would also give groundtruths.

@Robzz
Copy link
Member

Robzz commented Oct 15, 2019

I just verified the values with the following quick'n dirty python opencv script:

#!/usr/bin/env python3
import cv2
import numpy as np
from sys import argv

img = cv2.imread(argv[1], cv2.IMREAD_ANYCOLOR | cv2.IMREAD_ANYDEPTH)
try:
    rows, cols = img.shape
    print("Sum: ", np.sum(img))
except ValueError as e:
    rows, cols, channels = img.shape
    print("Sum: ", np.sum(img))

All 4 are OK, I suggest we merge 👍

@HeroicKatora HeroicKatora merged commit 770262c into image-rs:master Oct 15, 2019
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

Successfully merging this pull request may close these issues.

Better tests
3 participants