[php-src] Issue #7868: annotateImage rotation not working with antialias off
| From: | lolcatww | Date: | Sat, 01 Jan 2022 21:45:39 +0000 |
| Subject: | [php-src] Issue #7868: annotateImage rotation not working with antialias off | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-238705@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/7868
Author: lolcatww
### Description
The following code:
```<?php
$str = "waveringness bloodthirsty";
$img = new Imagick();
$img->newImage(500, 200, new ImagickPixel("#1d2021"));
$img->setImageFormat("png");
$draw = new ImagickDraw();
//$draw->setTextAntialias(false);
$draw->setFontSize(45);
$draw->setFillColor("#bdae93");
$img->annotateImage(
$draw,
0,
100,
random_int(-10, 10), //rotation
$str
);
header("Content-type: image/png");
echo $img;
?>
```
Works. That works well, but if you uncomment
$draw->setTextAntialias(false);, the
rotation doesnt get applied.
Result w/ antialias on:
https://imgur.com/mb0o2JG
Result w/ antialias off
https://imgur.com/4T2HHJS
### PHP Version
PHP 7.4.25 (cli) (built: Oct 23 2021 21:53:50)
### Operating System
Debian GNU/Linux 11 (bullseye) x86_64