Skip to content

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Jan 6, 2025

We port the respective upstream fix[1]. We only run the test against bundled libgd, since external libgd may yield different results.

Cf. libgd/libgd@2b26be8.


Test outputs prior to the fix:
rotate-bad

After the fix:
rotate-good

Rather notable difference, even without enlarging. When enlarging with nearest neighbor, one can see that there are only black and white pixels, but no grey pixels (i.e. antialiasing is missing).

I have not ported the relevant part of the follow-up libgd/libgd@6267414; namely the removal of the rounding, since this appears to slightly decrease quality (artifacts noticeable when enlarging with nearest neighbor):
rotate

I'll have a closer look at this, but I think this PR is a relevant fix on its own.

We port the respective upstream fix[1].  We only run the test against
bundled libgd, since external libgd may yield different results.

Cf. <libgd/libgd@2b26be8>.
@cmb69 cmb69 closed this in 4768348 Jan 6, 2025
@cmb69 cmb69 deleted the cmb/gd223 branch January 6, 2025 19:41
charmitro pushed a commit to wasix-org/php that referenced this pull request Mar 13, 2025
We port the respective upstream fix[1].  We only run the test against
bundled libgd, since external libgd may yield different results.

Cf. <libgd/libgd@2b26be8>.

Closes phpGH-17380.
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