mirror of
https://github.com/php/doc-es.git
synced 2026-03-27 17:02:16 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@336400 c90b9560-bf6c-de11-be94-00142212c4b1
93 lines
2.3 KiB
XML
93 lines
2.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 18dc6d0d465c80989566e19e68e1a9ff43dca9cf Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no Maintainer: seros -->
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.getpixeliterator">
|
|
<refnamediv>
|
|
<refname>Imagick::getPixelIterator</refname>
|
|
<refpurpose>Devuelve un objeto MagickPixelIterator</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>ImagickPixelIterator</type><methodname>Imagick::getPixelIterator</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Devuelve un objeto MagickPixelIterator.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve un objeto ImagickPixelIterator si se tuvo éxito.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
&imagick.imagick.throws;
|
|
</para>
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title> <function>Imagick::getPixelIterator</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
function getPixelIterator($imagePath) {
|
|
$imagick = new \Imagick(realpath($imagePath));
|
|
$imageIterator = $imagick->getPixelIterator();
|
|
|
|
foreach ($imageIterator as $fila => $píxeles) { /* Recorrer las filas de píxeles */
|
|
foreach ($píxeles as $columna => $píxel) { /* Recorrer los píxeles de la fila (columnas) */
|
|
/** @var $pixel \ImagickPixel */
|
|
if ($columna % 2) {
|
|
$píxel->setColor("rgba(0, 0, 0, 0)"); /* Pintar cada segundo píxel de negro */
|
|
}
|
|
}
|
|
$imageIterator->syncIterator(); /* Sincronizar el iterador; esto es importante en cada iteración */
|
|
}
|
|
|
|
header("Content-Type: image/jpg");
|
|
echo $imagick;
|
|
}
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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:"~/.phpdoc/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
|
|
-->
|