[php-src] PR #17380: Fix libgd 223: gdImageRotateGeneric() does not properly interpolate

From: Date: Mon, 06 Jan 2025 12:59:11 +0000
Subject: [php-src] PR #17380: Fix libgd 223: gdImageRotateGeneric() does not properly interpolate
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-30272@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/17380 Author: cmb69 We port the respective upstream fix[1]. We only run the test against bundled libgd, since external libgd may yield different results. Cf. <https://github.com/libgd/libgd/commit/2b26be874d0c0987c4906a40ef8f0e8fee04ae8f>. --- Test outputs prior to the fix: ![rotate-bad](https://github.com/user-attachments/assets/6c0c7fc8-8089-4804-aefd-f8a8018cddf5) After the fix: ![rotate-good](https://github.com/user-attachments/assets/cb9df28d-bd40-498f-bc1d-69505b387ae2) 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 https://github.com/libgd/libgd/commit/6267414dc2e58a84b331c53bfc6a5c5bdb0dbfaf; namely the removal of the rounding, since this appears to slightly decrease quality (artifacts noticeable when enlarging with nearest neighbor): ![rotate](https://github.com/user-attachments/assets/74c44ac5-4f52-48e3-b123-26d0dbd442f7) I'll have a closer look at this, but I think this PR is a relevant fix on its own.

« previous php.git-pulls (#30272) next »