<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=Image_Color</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/3093" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/3093">
      <title>Image_Color: Feature/Change Request 3093 [Open] improve readability with a new 'range' method</title>
      <link>http://pear.php.net/bugs/3093</link>
      <content:encoded><![CDATA[<pre>Image_Color Feature/Change Request
Reported by mquinton@...
2005-01-04T15:59:42+00:00
PHP: Irrelevant OS: irrelevant Package Version: 

Description:
------------
may be create a method to insure a 'range' value for RGB values like this ; also, lighter() and darker methods are more usable with this specifications.

this _range() method could be used in many method from Image_Color class.


  function lighter($color, $degree = 10){
    for ( $x = 0; $x &lt; 3; $x++ )
	    $color[$x] = $this-&gt;_range($color[$x]+$degree, 0, 255);

	return $color;
  }
  
  function darker($color, $degree = -10){
    return $this-&gt;lighter($color, -$degree);
  }

  function _range($val, $min, $max){
    if($val &lt; $min)
	  return $min;
	if($val &gt; $max)
	  return $max;
	return $val;
  }</pre>]]></content:encoded>
      <description><![CDATA[<pre>Image_Color Feature/Change Request
Reported by mquinton@...
2005-01-04T15:59:42+00:00
PHP: Irrelevant OS: irrelevant Package Version: 

Description:
------------
may be create a method to insure a 'range' value for RGB values like this ; also, lighter() and darker methods are more usable with this specifications.

this _range() method could be used in many method from Image_Color class.


  function lighter($color, $degree = 10){
    for ( $x = 0; $x &lt; 3; $x++ )
	    $color[$x] = $this-&gt;_range($color[$x]+$degree, 0, 255);

	return $color;
  }
  
  function darker($color, $degree = -10){
    return $this-&gt;lighter($color, -$degree);
  }

  function _range($val, $min, $max){
    if($val &lt; $min)
	  return $min;
	if($val &gt; $max)
	  return $max;
	return $val;
  }</pre>]]></description>
      <dc:date>2005-09-11T05:01:51+00:00</dc:date>
      <dc:creator>mquinton &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Image_Color Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
