note 123362 deleted from function.imagecropauto by cmb

From: Date: Sat, 24 Nov 2018 15:48:49 +0000
Subject: note 123362 deleted from function.imagecropauto by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-209764@lists.php.net to get a copy of this message
Note Submitter: fxpublic at yahoo dot fr ---- 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 !

« previous php.notes (#209764) next »