note 115191 added to imagick.contraststretchimage

From: Date: Wed, 11 Jun 2014 10:22:02 +0000
Subject: note 115191 added to imagick.contraststretchimage
Groups: php.notes 
Request: Send a blank email to php-notes+get-199649@lists.php.net to get a copy of this message
The black and white points refer to the absolute number of pixels. In the following example a coloured image is first desaturated (turned into a grey scale image) and then the darkest 90% of pixels are turned black, the brightest 5% are made white, and those between 90% and 95% are grey-scaled: <?php $im = new Imagick ("some_image.jpg"); list ($width, $height) = array_values ($im->getImageGeometry ()); $im->modulateImage (100, 0, 100); $im->contrastStretchImage ($width * $height * 0.90, $width * $height * 0.95); $im->writeImage ("temp.jpg"); echo "<img src=\"temp.jpg\">"; ?> ---- Server IP: 212.124.37.9 Probable Submitter: 130.75.198.156 ---- Manual Page -- http://php.net/manual/en/imagick.contraststretchimage.php Edit -- https://master.php.net/note/edit/115191 Del: integrated -- https://master.php.net/note/delete/115191/integrated Del: useless -- https://master.php.net/note/delete/115191/useless Del: bad code -- https://master.php.net/note/delete/115191/bad+code Del: spam -- https://master.php.net/note/delete/115191/spam Del: non-english -- https://master.php.net/note/delete/115191/non-english Del: in docs -- https://master.php.net/note/delete/115191/in+docs Del: other reasons-- https://master.php.net/note/delete/115191 Reject -- https://master.php.net/note/reject/115191 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#199649) next »