svn: /phpdoc/en/trunk/reference/imagick/imagick/ exportimagepixels.xml remapimage.xml

From: Date: Sat, 31 Oct 2009 13:34:23 +0000
Subject: svn: /phpdoc/en/trunk/reference/imagick/imagick/ exportimagepixels.xml remapimage.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5257@lists.php.net to get a copy of this message
mkoppanen Sat, 31 Oct 2009 13:34:23 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=290104 Log: added exportImagepixels Changed paths: A phpdoc/en/trunk/reference/imagick/imagick/exportimagepixels.xml U phpdoc/en/trunk/reference/imagick/imagick/remapimage.xml Added: phpdoc/en/trunk/reference/imagick/imagick/exportimagepixels.xml =================================================================== --- phpdoc/en/trunk/reference/imagick/imagick/exportimagepixels.xml (rev 0) +++ phpdoc/en/trunk/reference/imagick/imagick/exportimagepixels.xml 2009-10-31 13:34:23 UTC (rev 290104) @@ -0,0 +1,182 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> + +<refentry xml:id="imagick.exportimagepixels" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv> + <refname>Imagick::exportImagePixels</refname> + <refpurpose>Exports raw image pixels</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <modifier>public</modifier> <type>array</type><methodname>Imagick::exportImagePixels</methodname> + <methodparam><type>int</type><parameter>x</parameter></methodparam> + <methodparam><type>int</type><parameter>y</parameter></methodparam> + <methodparam><type>int</type><parameter>width</parameter></methodparam> + <methodparam><type>int</type><parameter>height</parameter></methodparam> + <methodparam><type>string</type><parameter>map</parameter></methodparam> + <methodparam><type>int</type><parameter>STORAGE</parameter></methodparam> + </methodsynopsis> + <para> + Exports image pixels into an array. The map defines the ordering of the exported + pixels. The size of the returned array is <literal>width * height * strlen(map)</literal>. + &imagick.method.available.0x647; + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>x</parameter></term> + <listitem> + <para> + X-coordinate of the exported area + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>y</parameter></term> + <listitem> + <para> + Y-coordinate of the exported area + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>width</parameter></term> + <listitem> + <para> + Width of the exported aread + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>height</parameter></term> + <listitem> + <para> + Height of the exported area + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>map</parameter></term> + <listitem> + <para> + Ordering of the exported pixels. For example <literal>"RGB"</literal>. + Valid characters for the map are R, G, B, A, O, C, Y, M, K, I and P. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>STORAGE</parameter></term> + <listitem> + <para> + Refer to this list of <link linkend="imagick.constants.pixel">pixel type constants</link> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Using <function>Imagick::exportImagePixels</function></title> + <para> + Export image pixels into an array + </para> + <programlisting role="php"> +<![CDATA[ +<?php + +/* Create new object */ +$im = new Imagick(); + +/* Create new image */ +$im->newPseudoImage(0, 0, "magick:rose"); + +/* Export the image pixels */ +$pixels = $im->exportImagePixels(10, 10, 2, 2, "RGB", Imagick::PIXEL_CHAR); + +/* Output */ +var_dump($pixels); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +array(12) { + [0]=> + 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) +} +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns an array containing the pixels values. + </para> + </refsect1> + + <refsect1 role="errors"> + &reftitle.errors; + <para> + &imagick.imagick.throws; + </para> + </refsect1> + + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Modified: phpdoc/en/trunk/reference/imagick/imagick/remapimage.xml =================================================================== --- phpdoc/en/trunk/reference/imagick/imagick/remapimage.xml 2009-10-31 13:05:16 UTC (rev 290103) +++ phpdoc/en/trunk/reference/imagick/imagick/remapimage.xml 2009-10-31 13:34:23 UTC (rev 290104) @@ -45,13 +45,18 @@ </refsect1> <refsect1 role="returnvalues"> - &reftitle.returnvalues; + &reftitle.returnvalues; <para> + &imagick.return.success; + </para> + </refsect1> + <refsect1 role="errors"> + &reftitle.errors; + <para> + &imagick.imagick.throws; </para> </refsect1> - - </refentry> <!-- Keep this comment at the end of the file

« previous php.doc.cvs (#5257) next »