Bug #69182 [Opn->Fbk]: imagecropauto function not working
| From: | cmb@php.net | Date: | Mon, 11 Jul 2016 16:30:11 +0000 |
| Subject: | Bug #69182 [Opn->Fbk]: imagecropauto function not working | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202204@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69182&edit=1
ID: 69182
Updated by: cmb@php.net
Reported by: omid dot khodatars at gmail dot com
Summary: imagecropauto function not working
-Status: Open
+Status: Feedback
Type: Bug
-Package: *General Issues
+Package: GD related
Operating System: windows
PHP Version: 5.5.22
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Apparently, in your case imagecropauto() returns false. I can't
reproduce this behavior, however (tested with PHP 5.5.20 and
5.6.15 on Windows). If you still experience this problem on recent
PHP versions, please provide the image (img.png) you've used.
BTW: the $threshhold and $color arguments are needed only if
$mode==IMG_CROP_THRESHOLD.
Previous Comments:
------------------------------------------------------------------------
[2015-03-04 12:07:12] omid dot khodatars at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.imagecropauto
---
Test script:
---------------
here is the code
$ini_filename = 'img.png';
$im = imagecreatefrompng($ini_filename );
$to_crop_array = array('x' =>310 , 'y' => 0, 'width' => 573,
'height'=> 500);
$thumb_im = imagecropauto($im ,IMG_CROP_WHITE , .5 ,-1 );
// $thumb_im = imagecrop($im, $to_crop_array);
imagepng($thumb_im, 'imgOut.png', 9);
and here is the error
Warning: imagepng() expects parameter 1 to be resource, boolean given in ... on line 9
it is working fine with imagecrop() by the way.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69182&edit=1