Skip to content

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Dec 25, 2024

Checking for the exact output of most image formats is brittle; even an otherwise change to some header field causes the output to change, even if the image would be visually identical.

Checking for an (MD5) hash is even worse, since if the tests fails, we have no clue for what reason.

Thus we compare the generated image against an pre-generated PNG, using a test helper which will output a simple image diff in case of test failure.

Checking for the exact output of most image formats is brittle; even an
otherwise change to some header field causes the output to change, even
if the image would be visually identical.

Checking for an (MD5) hash is even worse, since if the tests fails, we
have no clue for what reason.

Thus we compare the generated image against an pre-generated PNG, using
a test helper which will output a simple image diff in case of test
failure.
Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

@cmb69 cmb69 merged commit c1c6520 into php:master Dec 25, 2024
10 checks passed
@cmb69 cmb69 deleted the cmb/imagebmp_basic.phpt branch December 25, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants