note 119323 added to imagick.sparsecolorimage

From: Date: Thu, 12 May 2016 20:48:52 +0000
Subject: note 119323 added to imagick.sparsecolorimage
Groups: php.notes 
Request: Send a blank email to php-notes+get-205476@lists.php.net to get a copy of this message
For those curious how to use sparseColorImage() directly without the seperate createGradientImage() function.. here is the format of the array used: Array ( [0] => 0 // X1 (X coordinate value #1) [1] => 0 // Y1 (Y coordinate value #1) [2] => 1 // R (red value between 0 and 1) [3] => 0 // G (green value between 0 and 1) [4] => 0 // B (blue value between 0 and 1) [5] => 1 // A (alpha value between 0 and 1) [6] => 400 // X2 [7] => 0 // Y2 [8] => 0 // R [9] => 1 // G [10] => 0 // B [11] => 1 // A [12] => 0 // X3 [13] => 400 // Y3 [14] => 1 // R [15] => 1 // G [16] => 0 // B [17] => 1 // A [18] => 400 // X4 [19] => 400 // Y4 [20] => 0 // R [21] => 0 // G [22] => 1 // B [23] => 1 // A ) <?php $imagick = new imagick(); $imagick->newImage(400,400,"white"); $imagick->setImageFormat("png"); $array = Array(0,0,1,0,0,1,400,0,0,1,0,1,0,400,1,1,0,1,400,400,0,0,1,1); $imagick->sparseColorImage(imagick::SPARSECOLORMETHOD_BILINEAR,$array); header("Content-Type: image/png"); echo $imagick->getImageBlob(); ?> ---- Server IP: 72.52.91.14 Probable Submitter: 2600:8807:5607:ed00:a574:c2ac:5614:f823 ---- Manual Page -- http://php.net/manual/en/imagick.sparsecolorimage.php Edit -- https://master.php.net/note/edit/119323 Del: integrated -- https://master.php.net/note/delete/119323/integrated Del: useless -- https://master.php.net/note/delete/119323/useless Del: bad code -- https://master.php.net/note/delete/119323/bad+code Del: spam -- https://master.php.net/note/delete/119323/spam Del: non-english -- https://master.php.net/note/delete/119323/non-english Del: in docs -- https://master.php.net/note/delete/119323/in+docs Del: other reasons-- https://master.php.net/note/delete/119323 Reject -- https://master.php.net/note/reject/119323 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#205476) next »