[PHP-BUG] Bug #71218 [NEW]: imagecropauto introduces black line
[email protected] ("flip101 at gmail dot com")
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
From: flip101 at gmail dot com
Operating system: Windows 7 64bits
PHP version: 5.6.16
Package: GD related
Bug Type: Bug
Bug description:imagecropauto introduces black line
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 bug report at https://bugs.php.net/bug.php?id=71218&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71218&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71218&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71218&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71218&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71218&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71218&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71218&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71218&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71218&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71218&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71218&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71218&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71218&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71218&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71218&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71218&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71218&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71218&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71218&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71218&r=mysqlcfg