Fixed testing good P mode BMP images #9319
Open
+2
−580
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Looking at the following code
Pillow/Tests/test_bmp_reference.py
Lines 105 to 107 in b0a5bc2
it is readily apparent that it should read
compare = compare.convert("RGBA").Changing this does cause a file comparison to fail
Pillow/Tests/test_bmp_reference.py
Line 75 in b0a5bc2
However, the test images have both pal8nonsquare-e.png and pal8nonsquare-v.png. Changing the test to compare against pal8nonsquare-e.png causes it to pass. https://github.com/jsummers/bmpsuite/blob/master/html/bmpsuite.html describes the difference as
While that's not the clearest distinction for Pillow, this PR is just editing our test suite. Since we favour backwards compatibility, I'm going to choose pal8nonsquare-e.png, saying that Pillow is an 'image editor', since we currently leave the image squashed.
While I'm here, I'm also going to remove a number of comparison BMP images that we don't actually use, and the BMP HTML documentation.