From 509eaa270e35e75e0ec256c987142e4be5d979ae Mon Sep 17 00:00:00 2001 From: Mikko Koppanen Date: Sat, 31 Oct 2009 13:34:23 +0000 Subject: [PATCH] added exportImagepixels git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@290104 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../imagick/imagick/exportimagepixels.xml | 182 ++++++++++++++++++ reference/imagick/imagick/remapimage.xml | 11 +- 2 files changed, 190 insertions(+), 3 deletions(-) create mode 100644 reference/imagick/imagick/exportimagepixels.xml diff --git a/reference/imagick/imagick/exportimagepixels.xml b/reference/imagick/imagick/exportimagepixels.xml new file mode 100644 index 0000000000..ca95c7f3e5 --- /dev/null +++ b/reference/imagick/imagick/exportimagepixels.xml @@ -0,0 +1,182 @@ + + + + + + Imagick::exportImagePixels + Exports raw image pixels + + + + &reftitle.description; + + public arrayImagick::exportImagePixels + intx + inty + intwidth + intheight + stringmap + intSTORAGE + + + Exports image pixels into an array. The map defines the ordering of the exported + pixels. The size of the returned array is width * height * strlen(map). + &imagick.method.available.0x647; + + + + + &reftitle.parameters; + + + + x + + + X-coordinate of the exported area + + + + + y + + + Y-coordinate of the exported area + + + + + width + + + Width of the exported aread + + + + + height + + + Height of the exported area + + + + + map + + + Ordering of the exported pixels. For example "RGB". + Valid characters for the map are R, G, B, A, O, C, Y, M, K, I and P. + + + + + STORAGE + + + Refer to this list of pixel type constants + + + + + + + + + &reftitle.examples; + + + Using <function>Imagick::exportImagePixels</function> + + Export image pixels into an array + + +newPseudoImage(0, 0, "magick:rose"); + +/* Export the image pixels */ +$pixels = $im->exportImagePixels(10, 10, 2, 2, "RGB", Imagick::PIXEL_CHAR); + +/* Output */ +var_dump($pixels); +?> +]]> + + &example.outputs; + + + int(72) + [1]=> + int(64) + [2]=> + int(57) + [3]=> + int(69) + [4]=> + int(59) + [5]=> + int(43) + [6]=> + int(124) + [7]=> + int(120) + [8]=> + int(-96) + [9]=> + int(91) + [10]=> + int(84) + [11]=> + int(111) +} +]]> + + + + + + + &reftitle.returnvalues; + + Returns an array containing the pixels values. + + + + + &reftitle.errors; + + &imagick.imagick.throws; + + + + + + + diff --git a/reference/imagick/imagick/remapimage.xml b/reference/imagick/imagick/remapimage.xml index 02198e47db..317494b475 100644 --- a/reference/imagick/imagick/remapimage.xml +++ b/reference/imagick/imagick/remapimage.xml @@ -45,13 +45,18 @@ - &reftitle.returnvalues; + &reftitle.returnvalues; - + &imagick.return.success; - + + &reftitle.errors; + + &imagick.imagick.throws; + +