Bug #71218 [Com]: imagecropauto introduces black line
| From: | flip101 at gmail dot com | Date: | Fri, 25 Dec 2015 17:42:07 +0000 |
| Subject: | Bug #71218 [Com]: imagecropauto introduces black line | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-198221@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71218&edit=1
ID: 71218
Comment by: flip101 at gmail dot com
Reported by: flip101 at gmail dot com
Summary: imagecropauto introduces black line
Status: Open
Type: Bug
Package: GD related
Operating System: Windows 7 64bits
PHP Version: 5.6.16
Block user comment: N
Private report: N
New Comment:
Seems to be duplicate of https://bugs.php.net/bug.php?id=67447
Previous Comments:
------------------------------------------------------------------------
[2015-12-25 17:19:12] flip101 at gmail dot com
Description:
------------
When cropping an image suddenly a black line appears at the bottom of the image. To demonstrate this
you can have a look at https://i.imgur.com/2G6J9iu.png
where i combined the cropped and non-cropped in the same image. Of course you can not see the
original image borders in this representation. So if it's not clear to you, just run the test
script, twice maybe with $img = imagecropauto($img); commented out a second time. I tried viewing
with IrfanView 4.37 and Paint.NET 4.0.6
Test script:
---------------
<?php
$img = imagecreatetruecolor(400, 400);
imagefill($img, 0, 0, imagecolorallocate($img, 255, 255, 255)); // white background
$blue = imagecolorallocate($img, 0, 0, 255);
foreach (range(1, 5) as $font) {
imagestring($img, $font, 10, $font * 15, 'test', $blue);
}
$img = imagecropauto($img);
imagepng($img, 'test.png');
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71218&edit=1