While investigating why my patch for issuedid not pass, I stumbled upon a few bad tests in image.test
The tests usually check if all four corners of a test image are of the expected colours. However, only the last result is actually used in the assert call, which means that for every test, only the bottom-left corner is tested. And this corner is transparent, which means it does not even have the same problems as the other corners.
After correcting this several tests fail, either because of genuine bugs which were not tested or because of problems in these tests which were not visible until now.
The proposed patch moves the assert call inside the foreach loop that checks every corner, corrects three tests that were expecting wrong values: fuschia instead of transparent for rotation, black instead of light grey for yellow desaturation, and white instead of light grey for yellow desaturation in GIF.
The problem with GIF desaturation was due to a bug in the GD toolkit, where GIFs were desaturated without being reindexed. This bug was attributed to a problem with transparency because only the last corner was checked, while it was in fact also present on other colours (which was made visible by fixing the tests).
Therefore my patch also fixes the image_gd_desaturate() function in core/modules/system/image.gd.inc.
|#30||drupal8.image-system.1579810-30.patch||5.11 KB||Albert Volkman|
|PASSED: [[SimpleTest]]: [MySQL] 58,973 pass(es).|
|PASSED: [[SimpleTest]]: [MySQL] 59,087 pass(es).|
|PASSED: [[SimpleTest]]: [MySQL] 58,779 pass(es).|
|#18||drupal8.image-system.1579810-18.patch||753 bytes||Albert Volkman|
|PASSED: [[SimpleTest]]: [MySQL] 58,808 pass(es).|
|PASSED: [[SimpleTest]]: [MySQL] 42,818 pass(es).|