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

Added test images #1

Merged
merged 2 commits into from Dec 5, 2023
Merged

Added test images #1

merged 2 commits into from Dec 5, 2023

Conversation

radarhere
Copy link

@radarhere radarhere commented Dec 4, 2023

Suggestions for python-pillow#7603

  1. You will see in some of the other DDS tests we compare the opened image to a saved PNG version. So this adds that.

However, my macOS Preview application doesn't think that the DDS image looks like the PNG that Pillow created and I've included here - but then again, macOS Preview could be wrong.

So if you think the PNG I've included here is correct, then feel free to merge this.
Otherwise, let me know, as this is a problem to be investigated.

  1. I've hexeditted your image to add a BC4 TYPELESS test image.

@radarhere radarhere changed the title Added expected test image Added test images Dec 4, 2023
@sambvfx
Copy link
Owner

sambvfx commented Dec 5, 2023

Thanks @radarhere!

The original PNG was simply the existing ati1.png from the tests.

You will see in some of the other DDS tests we compare the opened image to a saved PNG version. So this adds that.

I ran into issues comparing the original png to the dds version when it compared tobytes(). I'll check again to see if this test is passing.

I've hexeditted your image to add a BC4 TYPELESS test image.

Thank you!

@sambvfx sambvfx merged commit 8a88e43 into sambvfx:bc4-dds Dec 5, 2023
@radarhere radarhere deleted the bc4-dds branch December 5, 2023 02:17
@radarhere
Copy link
Author

The compression is lossy format, so it is not unexpected that converting to it created a slightly different file.

Testing, I find that assert_image_similar_tofile(im, TEST_FILE_ATI1.replace(".dds", ".png"), 0.4) passes, but this assert_image_equal_tofile is a stronger test, so the current version is fine to my way of thinking.

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