note 123362 added to function.imagecropauto

From: Date: Fri, 23 Nov 2018 07:50:52 +0000
Subject: note 123362 added to function.imagecropauto
Groups: php.notes 
Request: Send a blank email to php-notes+get-209759@lists.php.net to get a copy of this message
After having spent some time to understand why this function didn't work for me (no crop at all and no error, no 'false' return), I realized 2 things: 1- the default value of the 'mode' parameter is set to -1. AFAIK, this value doesn't match any allowed constant and specially IMG_CROP_DEFAULT that values to 0. 2- IMG_CROP_DEFAULT used on a png image doesn't do anything, even if the png has no alpha layer. I had to use directly IMG_CROP_SIDES instead. Thus consider that the 'mode' parameter is not optionnal if you want to get the result you're waiting for ! Hopefully this comment will help someone ! ---- Server IP: 208.43.231.9 Probable Submitter: 2a01:e35:2eb6:d3e0:7595:4848:f6b:4482 ---- Manual Page -- http://php.net/manual/en/function.imagecropauto.php Edit -- https://master.php.net/note/edit/123362 Del: integrated -- https://master.php.net/note/delete/123362/integrated Del: useless -- https://master.php.net/note/delete/123362/useless Del: bad code -- https://master.php.net/note/delete/123362/bad+code Del: spam -- https://master.php.net/note/delete/123362/spam Del: non-english -- https://master.php.net/note/delete/123362/non-english Del: in docs -- https://master.php.net/note/delete/123362/in+docs Del: other reasons-- https://master.php.net/note/delete/123362 Reject -- https://master.php.net/note/reject/123362 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#209759) next »