Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added test images#1

Merged
sambvfx merged 2 commits into
sambvfx:bc4-ddsfrom
radarhere:bc4-dds
Dec 5, 2023
Merged

Added test images#1
sambvfx merged 2 commits into
sambvfx:bc4-ddsfrom
radarhere:bc4-dds

Conversation

@radarhere

@radarhere radarhere commented Dec 4, 2023

Copy link
Copy Markdown

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

sambvfx commented Dec 5, 2023

Copy link
Copy Markdown
Owner

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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

2 participants