cvs: phpdoc-es /reference/image/functions imagecolorsforindex.xml

From: Date: Sat, 06 Aug 2005 12:44:55 +0000
Subject: cvs: phpdoc-es /reference/image/functions imagecolorsforindex.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-1227@lists.php.net to get a copy of this message
javi Sat Aug 6 08:44:55 2005 EDT Modified files: /phpdoc-es/reference/image/functions imagecolorsforindex.xml Log: - Añadido EN-Revision - Actualizada la descripcion - Añadido el ejemplo - Actualizado el See Also http://cvs.php.net/diff.php/phpdoc-es/reference/image/functions/imagecolorsforindex.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/image/functions/imagecolorsforindex.xml diff -u phpdoc-es/reference/image/functions/imagecolorsforindex.xml:1.1 phpdoc-es/reference/image/functions/imagecolorsforindex.xml:1.2 --- phpdoc-es/reference/image/functions/imagecolorsforindex.xml:1.1 Sun Apr 14 20:14:51 2002 +++ phpdoc-es/reference/image/functions/imagecolorsforindex.xml Sat Aug 6 08:44:54 2005 @@ -1,25 +1,71 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/image.xml, last change in rev 1.1 --> -<!-- last change to 'imagecolorsforindex' in en/ tree in rev 1.36 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.4 Maintainer: javi Status: ready --> +<!-- splitted from ./en/functions/image.xml, last change in rev 1.36 --> <refentry id="function.imagecolorsforindex"> <refnamediv> - <refname>ImageColorsForIndex</refname> + <refname>imagecolorsforindex</refname> <refpurpose>Obtiene los colores de un &iacute;ndice</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>array</type><methodname>imagecolorsforindex</methodname> - <methodparam><type>int</type><parameter>im</parameter></methodparam> + <methodparam><type>resource</type><parameter>im</parameter></methodparam> <methodparam><type>int</type><parameter>index</parameter></methodparam> </methodsynopsis> <para> - Devuelve una matriz asociativa con las claves red, green y blue - que contienen los valores apropiados para el color especificado - en el &iacute;ndice.</para> + Devuelve una matriz asociativa con las claves red, green, blue y + alpha que contienen los valores apropiados para el color especificado + en el &iacute;ndice. + </para> <para> - Vea tambi&eacute;n <function>imagecolorat</function> y - <function>imagecolorexact</function>.</para> + <example> + <title>Ejemplo de <function>imagecolorsforindex</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// abre una imagen +$im = imagecreatefrompng('nexen.png'); + +// obtiene un color +$start_x = 40; +$start_y = 50; +$color_index = imagecolorat($im, $start_x, $start_y); + +// se obtiene su valor en un formato mas facil de leer +$color_tran = imagecolorsforindex($im, $color_index); + +// que color es ? +echo '<pre>'; +print_r($color_tran); +echo '</pre>'; + +?> +]]> + </programlisting> + <para> + La salida del programa ser&iacute;a: + </para> + <screen> +<![CDATA[ +Array +( + [red] => 226 + [green] => 222 + [blue] => 252 + [alpha] => 0 +) +]]> + </screen> + </example> + </para> + <para> + Vea tambi&eacute;n <function>imagecolorat</function> y + <function>imagecolorexact</function>. + </para> + </refsect1> </refentry>

« previous php.doc.es (#1227) next »