note 115193 added to imagick.linearstretchimage
| From: | SkepticaLee | Date: | Wed, 11 Jun 2014 12:54:56 +0000 |
| Subject: | note 115193 added to imagick.linearstretchimage | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199651@lists.php.net to get a copy of this message | ||
"Black" and "white" points here are pixel counts from the darkest and brightest
ends respectively. To turn the darkest 90% of the pixels black, and the brightest 5% white, use the
following:
<?php
$im = new Imagick ("some image.png");
list ($width, $height) = array_values ($im->getImageGeometry ());
$px = $width * $height;
$im->modulateImage (100, 0, 100);
$im->linearStretchImage ($px * 0.9, $px * 0.05);
$im->writeImage ("temp.jpg");
?>
----
Server IP: 212.124.37.9
Probable Submitter: 130.75.198.156
----
Manual Page -- http://php.net/manual/en/imagick.linearstretchimage.php
Edit -- https://master.php.net/note/edit/115193
Del: integrated -- https://master.php.net/note/delete/115193/integrated
Del: useless -- https://master.php.net/note/delete/115193/useless
Del: bad code -- https://master.php.net/note/delete/115193/bad+code
Del: spam -- https://master.php.net/note/delete/115193/spam
Del: non-english -- https://master.php.net/note/delete/115193/non-english
Del: in docs -- https://master.php.net/note/delete/115193/in+docs
Del: other reasons-- https://master.php.net/note/delete/115193
Reject -- https://master.php.net/note/reject/115193
Search -- https://master.php.net/manage/user-notes.php