removing unused files

skala
Julio Montoya 12 years ago
parent 0355644d79
commit cf973be78f
  1. 142
      vendor/imagine/imagine/docs/API/API/Imagine/Filter/Basic/WebOptimization.html
  2. 62
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette.html
  3. 381
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/CMYK.html
  4. 57
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/Color.html
  5. 601
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/Color/CMYK.html
  6. 452
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/Color/ColorInterface.html
  7. 499
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/Color/Gray.html
  8. 571
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/Color/RGB.html
  9. 9
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/Color/namespace-frame.html
  10. 215
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/ColorParser.html
  11. 381
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/Grayscale.html
  12. 384
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/PaletteInterface.html
  13. 381
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/RGB.html
  14. 9
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Palette/namespace-frame.html
  15. 218
      vendor/imagine/imagine/docs/API/API/Imagine/Image/Profile.html
  16. 116
      vendor/imagine/imagine/docs/API/API/Imagine/Image/ProfileInterface.html
  17. 105
      vendor/imagine/imagine/docs/usage/colors.rst
  18. 57
      vendor/imagine/imagine/lib/Imagine/Filter/Basic/WebOptimization.php
  19. 122
      vendor/imagine/imagine/lib/Imagine/Image/Palette/CMYK.php
  20. 225
      vendor/imagine/imagine/lib/Imagine/Image/Palette/Color/CMYK.php
  21. 95
      vendor/imagine/imagine/lib/Imagine/Image/Palette/Color/ColorInterface.php
  22. 180
      vendor/imagine/imagine/lib/Imagine/Image/Palette/Color/Gray.php
  23. 224
      vendor/imagine/imagine/lib/Imagine/Image/Palette/Color/RGB.php
  24. 176
      vendor/imagine/imagine/lib/Imagine/Image/Palette/ColorParser.php
  25. 127
      vendor/imagine/imagine/lib/Imagine/Image/Palette/Grayscale.php
  26. 87
      vendor/imagine/imagine/lib/Imagine/Image/Palette/PaletteInterface.php
  27. 131
      vendor/imagine/imagine/lib/Imagine/Image/Palette/RGB.php
  28. 63
      vendor/imagine/imagine/lib/Imagine/Image/Profile.php
  29. 29
      vendor/imagine/imagine/lib/Imagine/Image/ProfileInterface.php
  30. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/CoatedFOGRA27.icc
  31. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/CoatedFOGRA39.icc
  32. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/CoatedGRACoL2006.icc
  33. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/JapanColor2001Coated.icc
  34. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/JapanColor2001Uncoated.icc
  35. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/JapanColor2002Newspaper.icc
  36. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/JapanColor2003WebCoated.icc
  37. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/JapanWebCoated.icc
  38. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/USWebCoatedSWOP.icc
  39. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/USWebUncoated.icc
  40. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/UncoatedFOGRA29.icc
  41. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/WebCoatedFOGRA28.icc
  42. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/WebCoatedSWOP2006Grade3.icc
  43. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/WebCoatedSWOP2006Grade5.icc
  44. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/Color Profile Bundling License_10.15.08.pdf
  45. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/Profile Information.pdf
  46. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/RGB/AdobeRGB1998.icc
  47. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/RGB/AppleRGB.icc
  48. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/RGB/ColorMatchRGB.icc
  49. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/RGB/PAL_SECAM.icc
  50. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/RGB/SMPTE-C.icc
  51. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/RGB/VideoHD.icc
  52. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/RGB/VideoNTSC.icc
  53. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/RGB/VideoPAL.icc
  54. BIN
      vendor/imagine/imagine/lib/Imagine/resources/Adobe/Trademark Information.pdf
  55. BIN
      vendor/imagine/imagine/lib/Imagine/resources/color.org/sRGB_IEC61966-2-1_black_scaled.icc
  56. BIN
      vendor/imagine/imagine/lib/Imagine/resources/color.org/sRGB_IEC61966-2-1_no_black_scaling.icc
  57. BIN
      vendor/imagine/imagine/lib/Imagine/resources/colormanagement.org/ISOcoated_v2_grey1c_bas.ICC
  58. 114
      vendor/imagine/imagine/tests/Imagine/Filter/Basic/WebOptimizationTest.php
  59. BIN
      vendor/imagine/imagine/tests/Imagine/Fixtures/pixel-CMYK.jpg
  60. BIN
      vendor/imagine/imagine/tests/Imagine/Fixtures/pixel-GBR.jpg
  61. BIN
      vendor/imagine/imagine/tests/Imagine/Fixtures/pixel-grayscale.jpg
  62. 111
      vendor/imagine/imagine/tests/Imagine/Test/Image/Palette/AbstractPaletteTest.php
  63. 68
      vendor/imagine/imagine/tests/Imagine/Test/Image/Palette/CMYKTest.php
  64. 129
      vendor/imagine/imagine/tests/Imagine/Test/Image/Palette/Color/AbstractColorTest.php
  65. 75
      vendor/imagine/imagine/tests/Imagine/Test/Image/Palette/Color/CMYKTest.php
  66. 65
      vendor/imagine/imagine/tests/Imagine/Test/Image/Palette/Color/GrayTest.php
  67. 67
      vendor/imagine/imagine/tests/Imagine/Test/Image/Palette/Color/RGBTest.php
  68. 155
      vendor/imagine/imagine/tests/Imagine/Test/Image/Palette/ColorParserTest.php
  69. 64
      vendor/imagine/imagine/tests/Imagine/Test/Image/Palette/GrayscaleTest.php
  70. 64
      vendor/imagine/imagine/tests/Imagine/Test/Image/Palette/RGBTest.php
  71. 48
      vendor/imagine/imagine/tests/Imagine/Test/Image/ProfileTest.php

@ -1,142 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Filter\Basic\WebOptimization | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../../classes.html">Classes</a></li>
<li><a href="../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Class</div>
<h1><a href="../../../Imagine/Filter/Basic.html">Imagine\Filter\Basic</a>\WebOptimization</h1>
</div>
<div class="content">
<p>class <strong>WebOptimization</strong> implements
<a href="../../../Imagine/Filter/FilterInterface.html"><abbr title="Imagine\Filter\FilterInterface">FilterInterface</abbr></a></p>
<div class="description">
<p>A filter to render web-optimized images</p>
<p>
</p>
</div>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
</td>
<td class="last">
<a href="#method___construct">__construct</a>($path = null, array $options = array())
<p>
</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/ImageInterface.html"><abbr title="Imagine\Image\ImageInterface">ImageInterface</abbr></a>
</td>
<td class="last">
<a href="#method_apply">apply</a>(<a href="../../../Imagine/Image/ImageInterface.html"><abbr title="Imagine\Image\ImageInterface">ImageInterface</abbr></a> $image)
<p>Applies scheduled transformation to ImageInterface instance Returns processed ImageInterface instance</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method___construct">
<div class="location">at line 27</div>
<code> public
<strong>__construct</strong>($path = null, array $options = array())</code>
</h3>
<div class="details">
<p>
</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td></td>
<td>$path</td>
<td>
</td>
</tr>
<tr>
<td>array</td>
<td>$options</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_apply">
<div class="location">at line 41</div>
<code> public <a href="../../../Imagine/Image/ImageInterface.html"><abbr title="Imagine\Image\ImageInterface">ImageInterface</abbr></a>
<strong>apply</strong>(<a href="../../../Imagine/Image/ImageInterface.html"><abbr title="Imagine\Image\ImageInterface">ImageInterface</abbr></a> $image)</code>
</h3>
<div class="details">
<p>Applies scheduled transformation to ImageInterface instance Returns processed ImageInterface instance</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/ImageInterface.html"><abbr title="Imagine\Image\ImageInterface">ImageInterface</abbr></a></td>
<td>$image</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/ImageInterface.html"><abbr title="Imagine\Image\ImageInterface">ImageInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,62 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../stylesheet.css">
</head>
<body id="overview">
<div class="header">
<ul>
<li><a href="../../classes.html">Classes</a></li>
<li><a href="../../namespaces.html">Namespaces</a></li>
<li><a href="../../interfaces.html">Interfaces</a></li>
<li><a href="../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Namespace</div>
<h1>Imagine\Image\Palette</h1>
</div>
<div class="content">
<table>
<tr>
<td><a href="../../Imagine/Image/Palette/CMYK.html"><abbr title="Imagine\Image\Palette\CMYK">CMYK</abbr></a></td>
<td class="last">
</td>
</tr>
<tr>
<td><a href="../../Imagine/Image/Palette/ColorParser.html"><abbr title="Imagine\Image\Palette\ColorParser">ColorParser</abbr></a></td>
<td class="last">
</td>
</tr>
<tr>
<td><a href="../../Imagine/Image/Palette/Grayscale.html"><abbr title="Imagine\Image\Palette\Grayscale">Grayscale</abbr></a></td>
<td class="last">
</td>
</tr>
<tr>
<td><a href="../../Imagine/Image/Palette/RGB.html"><abbr title="Imagine\Image\Palette\RGB">RGB</abbr></a></td>
<td class="last">
</td>
</tr>
</table>
<h2>Interfaces</h2>
<table>
<tr>
<td><a href="../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></td>
<td class="last">
</td>
</tr>
</table>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,381 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette\CMYK | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../../classes.html">Classes</a></li>
<li><a href="../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Class</div>
<h1><a href="../../../Imagine/Image/Palette.html">Imagine\Image\Palette</a>\CMYK</h1>
</div>
<div class="content">
<p>class <strong>CMYK</strong> implements
<a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></p>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
</td>
<td class="last">
<a href="#method___construct">__construct</a>()
<p>
</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
String
</td>
<td class="last">
<a href="#method_name">name</a>()
<p>Returns the name of this Palette, one of PaletteInterface::PALETTE_* constants</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
array
</td>
<td class="last">
<a href="#method_pixelDefinition">pixelDefinition</a>()
<p>Returns an array containing ColorInterface::COLOR_* constants that define the structure of colors for a pixel.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
Boolean
</td>
<td class="last">
<a href="#method_supportsAlpha">supportsAlpha</a>()
<p>Tells if alpha channel is supported in this palette</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_color">color</a>(string|array|integer $color, integer|null $alpha = null)
<p>Returns a color given some values</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_blend">blend</a>(<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color1, <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color2, <abbr title="Imagine\Image\Palette\float">float</abbr> $amount)
<p>Blend two colors given an amount</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
</td>
<td class="last">
<a href="#method_useProfile">useProfile</a>(<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a> $profile)
<p>Attachs an ICC profile to this Palette.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a>
</td>
<td class="last">
<a href="#method_profile">profile</a>()
<p>Returns the ICC profile attached to this Palette.</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method___construct">
<div class="location">at line 27</div>
<code> public
<strong>__construct</strong>()</code>
</h3>
<div class="details">
<p>
</p>
<p>
</p>
<div class="tags">
</div>
</div>
<h3 id="method_name">
<div class="location">at line 35</div>
<code> public String
<strong>name</strong>()</code>
</h3>
<div class="details">
<p>Returns the name of this Palette, one of PaletteInterface::PALETTE_* constants</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>String</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_pixelDefinition">
<div class="location">at line 43</div>
<code> public array
<strong>pixelDefinition</strong>()</code>
</h3>
<div class="details">
<p>Returns an array containing ColorInterface::COLOR_* constants that define the structure of colors for a pixel.</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>array</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_supportsAlpha">
<div class="location">at line 56</div>
<code> public Boolean
<strong>supportsAlpha</strong>()</code>
</h3>
<div class="details">
<p>Tells if alpha channel is supported in this palette</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>Boolean</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_color">
<div class="location">at line 64</div>
<code> public <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>color</strong>(string|array|integer $color, integer|null $alpha = null)</code>
</h3>
<div class="details">
<p>Returns a color given some values</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>string|array|integer</td>
<td>$color</td>
<td>A color</td>
</tr>
<tr>
<td>integer|null</td>
<td>$alpha</td>
<td>Set alpha to null to disable it</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
<h4>Exceptions</h4>
<table>
<tr>
<td><a href="http://php.net/InvalidArgumentException"><abbr title="InvalidArgumentException">InvalidArgumentException</abbr></a></td>
<td>In case you pass an alpha value to a Palette that does not support alpha</td>
</tr>
</table>
</div>
</div>
<h3 id="method_blend">
<div class="location">at line 85</div>
<code> public <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>blend</strong>(<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color1, <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color2, <abbr title="Imagine\Image\Palette\float">float</abbr> $amount)</code>
</h3>
<div class="details">
<p>Blend two colors given an amount</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>$color1</td>
<td>
</td>
</tr>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>$color2</td>
<td>
</td>
</tr>
<tr>
<td><abbr title="Imagine\Image\Palette\float">float</abbr></td>
<td>$amount</td>
<td>The amount of color2 in color1</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_useProfile">
<div class="location">at line 102</div>
<code> public <a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
<strong>useProfile</strong>(<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a> $profile)</code>
</h3>
<div class="details">
<p>Attachs an ICC profile to this Palette.</p>
<p>(A default profile is provided by default)</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a></td>
<td>$profile</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_profile">
<div class="location">at line 112</div>
<code> public <a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a>
<strong>profile</strong>()</code>
</h3>
<div class="details">
<p>Returns the ICC profile attached to this Palette.</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,57 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette\Color | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
</head>
<body id="overview">
<div class="header">
<ul>
<li><a href="../../../classes.html">Classes</a></li>
<li><a href="../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Namespace</div>
<h1>Imagine\Image\Palette\Color</h1>
</div>
<div class="content">
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/CMYK.html"><abbr title="Imagine\Image\Palette\Color\CMYK">CMYK</abbr></a></td>
<td class="last">
</td>
</tr>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/Gray.html"><abbr title="Imagine\Image\Palette\Color\Gray">Gray</abbr></a></td>
<td class="last">
</td>
</tr>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/RGB.html"><abbr title="Imagine\Image\Palette\Color\RGB">RGB</abbr></a></td>
<td class="last">
</td>
</tr>
</table>
<h2>Interfaces</h2>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td class="last">
</td>
</tr>
</table>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,601 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette\Color\CMYK | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../../../classes.html">Classes</a></li>
<li><a href="../../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Class</div>
<h1><a href="../../../../Imagine/Image/Palette/Color.html">Imagine\Image\Palette\Color</a>\CMYK</h1>
</div>
<div class="content">
<p>class <strong>CMYK</strong> implements
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></p>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
</td>
<td class="last">
<a href="#method___construct">__construct</a>(<a href="../../../../Imagine/Image/Palette/CMYK.html"><abbr title="Imagine\Image\Palette\CMYK">CMYK</abbr></a> $palette, array $color)
<p>
</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
Integer
</td>
<td class="last">
<a href="#method_getValue">getValue</a>(string $component)
<p>Return the value of one of the component.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getCyan">getCyan</a>()
<p>Returns Cyan value of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getMagenta">getMagenta</a>()
<p>Returns Magenta value of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getYellow">getYellow</a>()
<p>Returns Yellow value of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getKeyline">getKeyline</a>()
<p>Returns Key value of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
</td>
<td class="last">
<a href="#method_getPalette">getPalette</a>()
<p>Returns the palette attached to the current color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getAlpha">getAlpha</a>()
<p>Returns percentage of transparency of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_dissolve">dissolve</a>(integer $alpha)
<p>Returns a copy of current color, incrementing the alpha channel by the given amount</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_lighten">lighten</a>(integer $shade)
<p>Returns a copy of the current color, lightened by the specified number of shades</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_darken">darken</a>(integer $shade)
<p>Returns a copy of the current color, darkened by the specified number of shades</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_grayscale">grayscale</a>()
<p>Returns a gray related to the current color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
Boolean
</td>
<td class="last">
<a href="#method_isOpaque">isOpaque</a>()
<p>Checks if the current color is opaque</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
string
</td>
<td class="last">
<a href="#method___toString">__toString</a>()
<p>Returns hex representation of the color</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method___construct">
<div class="location">at line 46</div>
<code> public
<strong>__construct</strong>(<a href="../../../../Imagine/Image/Palette/CMYK.html"><abbr title="Imagine\Image\Palette\CMYK">CMYK</abbr></a> $palette, array $color)</code>
</h3>
<div class="details">
<p>
</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/CMYK.html"><abbr title="Imagine\Image\Palette\CMYK">CMYK</abbr></a></td>
<td>$palette</td>
<td>
</td>
</tr>
<tr>
<td>array</td>
<td>$color</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getValue">
<div class="location">at line 55</div>
<code> public Integer
<strong>getValue</strong>(string $component)</code>
</h3>
<div class="details">
<p>Return the value of one of the component.</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>string</td>
<td>$component</td>
<td>One of the ColorInterface::COLOR_* component</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td>Integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getCyan">
<div class="location">at line 78</div>
<code> public integer
<strong>getCyan</strong>()</code>
</h3>
<div class="details">
<p>Returns Cyan value of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getMagenta">
<div class="location">at line 88</div>
<code> public integer
<strong>getMagenta</strong>()</code>
</h3>
<div class="details">
<p>Returns Magenta value of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getYellow">
<div class="location">at line 98</div>
<code> public integer
<strong>getYellow</strong>()</code>
</h3>
<div class="details">
<p>Returns Yellow value of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getKeyline">
<div class="location">at line 108</div>
<code> public integer
<strong>getKeyline</strong>()</code>
</h3>
<div class="details">
<p>Returns Key value of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getPalette">
<div class="location">at line 116</div>
<code> public <a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
<strong>getPalette</strong>()</code>
</h3>
<div class="details">
<p>Returns the palette attached to the current color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getAlpha">
<div class="location">at line 124</div>
<code> public integer
<strong>getAlpha</strong>()</code>
</h3>
<div class="details">
<p>Returns percentage of transparency of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_dissolve">
<div class="location">at line 132</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>dissolve</strong>(integer $alpha)</code>
</h3>
<div class="details">
<p>Returns a copy of current color, incrementing the alpha channel by the given amount</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$alpha</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_lighten">
<div class="location">at line 140</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>lighten</strong>(integer $shade)</code>
</h3>
<div class="details">
<p>Returns a copy of the current color, lightened by the specified number of shades</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$shade</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_darken">
<div class="location">at line 155</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>darken</strong>(integer $shade)</code>
</h3>
<div class="details">
<p>Returns a copy of the current color, darkened by the specified number of shades</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$shade</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_grayscale">
<div class="location">at line 170</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>grayscale</strong>()</code>
</h3>
<div class="details">
<p>Returns a gray related to the current color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_isOpaque">
<div class="location">at line 186</div>
<code> public Boolean
<strong>isOpaque</strong>()</code>
</h3>
<div class="details">
<p>Checks if the current color is opaque</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>Boolean</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method___toString">
<div class="location">at line 196</div>
<code> public string
<strong>__toString</strong>()</code>
</h3>
<div class="details">
<p>Returns hex representation of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,452 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette\Color\ColorInterface | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../../../classes.html">Classes</a></li>
<li><a href="../../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Interface</div>
<h1><a href="../../../../Imagine/Image/Palette/Color.html">Imagine\Image\Palette\Color</a>\ColorInterface</h1>
</div>
<div class="content">
<p>interface <strong>ColorInterface</strong></p>
<h2>Constants</h2>
<table>
<tr>
<td>COLOR_RED</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
<tr>
<td>COLOR_GREEN</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
<tr>
<td>COLOR_BLUE</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
<tr>
<td>COLOR_CYAN</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
<tr>
<td>COLOR_MAGENTA</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
<tr>
<td>COLOR_YELLOW</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
<tr>
<td>COLOR_KEYLINE</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
<tr>
<td>COLOR_GRAY</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
</table>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
Integer
</td>
<td class="last">
<a href="#method_getValue">getValue</a>(string $component)
<p>Return the value of one of the component.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getAlpha">getAlpha</a>()
<p>Returns percentage of transparency of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
</td>
<td class="last">
<a href="#method_getPalette">getPalette</a>()
<p>Returns the palette attached to the current color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_dissolve">dissolve</a>(integer $alpha)
<p>Returns a copy of current color, incrementing the alpha channel by the given amount</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_lighten">lighten</a>(integer $shade)
<p>Returns a copy of the current color, lightened by the specified number of shades</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_darken">darken</a>(integer $shade)
<p>Returns a copy of the current color, darkened by the specified number of shades</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_grayscale">grayscale</a>()
<p>Returns a gray related to the current color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
Boolean
</td>
<td class="last">
<a href="#method_isOpaque">isOpaque</a>()
<p>Checks if the current color is opaque</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method_getValue">
<div class="location">at line 36</div>
<code> public Integer
<strong>getValue</strong>(string $component)</code>
</h3>
<div class="details">
<p>Return the value of one of the component.</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>string</td>
<td>$component</td>
<td>One of the ColorInterface::COLOR_* component</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td>Integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getAlpha">
<div class="location">at line 43</div>
<code> public integer
<strong>getAlpha</strong>()</code>
</h3>
<div class="details">
<p>Returns percentage of transparency of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getPalette">
<div class="location">at line 50</div>
<code> public <a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
<strong>getPalette</strong>()</code>
</h3>
<div class="details">
<p>Returns the palette attached to the current color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_dissolve">
<div class="location">at line 60</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>dissolve</strong>(integer $alpha)</code>
</h3>
<div class="details">
<p>Returns a copy of current color, incrementing the alpha channel by the given amount</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$alpha</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_lighten">
<div class="location">at line 70</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>lighten</strong>(integer $shade)</code>
</h3>
<div class="details">
<p>Returns a copy of the current color, lightened by the specified number of shades</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$shade</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_darken">
<div class="location">at line 80</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>darken</strong>(integer $shade)</code>
</h3>
<div class="details">
<p>Returns a copy of the current color, darkened by the specified number of shades</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$shade</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_grayscale">
<div class="location">at line 87</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>grayscale</strong>()</code>
</h3>
<div class="details">
<p>Returns a gray related to the current color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_isOpaque">
<div class="location">at line 94</div>
<code> public Boolean
<strong>isOpaque</strong>()</code>
</h3>
<div class="details">
<p>Checks if the current color is opaque</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>Boolean</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,499 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette\Color\Gray | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../../../classes.html">Classes</a></li>
<li><a href="../../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Class</div>
<h1><a href="../../../../Imagine/Image/Palette/Color.html">Imagine\Image\Palette\Color</a>\Gray</h1>
</div>
<div class="content">
<p>class <strong>Gray</strong> implements
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></p>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
</td>
<td class="last">
<a href="#method___construct">__construct</a>(<a href="../../../../Imagine/Image/Palette/Grayscale.html"><abbr title="Imagine\Image\Palette\Grayscale">Grayscale</abbr></a> $palette, array $color, $alpha)
<p>
</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
Integer
</td>
<td class="last">
<a href="#method_getValue">getValue</a>(string $component)
<p>Return the value of one of the component.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getGray">getGray</a>()
<p>Returns Gray value of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
</td>
<td class="last">
<a href="#method_getPalette">getPalette</a>()
<p>Returns the palette attached to the current color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getAlpha">getAlpha</a>()
<p>Returns percentage of transparency of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_dissolve">dissolve</a>(integer $alpha)
<p>Returns a copy of current color, incrementing the alpha channel by the given amount</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_lighten">lighten</a>(integer $shade)
<p>Returns a copy of the current color, lightened by the specified number of shades</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_darken">darken</a>(integer $shade)
<p>Returns a copy of the current color, darkened by the specified number of shades</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_grayscale">grayscale</a>()
<p>Returns a gray related to the current color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
Boolean
</td>
<td class="last">
<a href="#method_isOpaque">isOpaque</a>()
<p>Checks if the current color is opaque</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
string
</td>
<td class="last">
<a href="#method___toString">__toString</a>()
<p>Returns hex representation of the color</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method___construct">
<div class="location">at line 35</div>
<code> public
<strong>__construct</strong>(<a href="../../../../Imagine/Image/Palette/Grayscale.html"><abbr title="Imagine\Image\Palette\Grayscale">Grayscale</abbr></a> $palette, array $color, $alpha)</code>
</h3>
<div class="details">
<p>
</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Grayscale.html"><abbr title="Imagine\Image\Palette\Grayscale">Grayscale</abbr></a></td>
<td>$palette</td>
<td>
</td>
</tr>
<tr>
<td>array</td>
<td>$color</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$alpha</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getValue">
<div class="location">at line 45</div>
<code> public Integer
<strong>getValue</strong>(string $component)</code>
</h3>
<div class="details">
<p>Return the value of one of the component.</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>string</td>
<td>$component</td>
<td>One of the ColorInterface::COLOR_* component</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td>Integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getGray">
<div class="location">at line 62</div>
<code> public integer
<strong>getGray</strong>()</code>
</h3>
<div class="details">
<p>Returns Gray value of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getPalette">
<div class="location">at line 70</div>
<code> public <a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
<strong>getPalette</strong>()</code>
</h3>
<div class="details">
<p>Returns the palette attached to the current color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getAlpha">
<div class="location">at line 78</div>
<code> public integer
<strong>getAlpha</strong>()</code>
</h3>
<div class="details">
<p>Returns percentage of transparency of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_dissolve">
<div class="location">at line 86</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>dissolve</strong>(integer $alpha)</code>
</h3>
<div class="details">
<p>Returns a copy of current color, incrementing the alpha channel by the given amount</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$alpha</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_lighten">
<div class="location">at line 96</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>lighten</strong>(integer $shade)</code>
</h3>
<div class="details">
<p>Returns a copy of the current color, lightened by the specified number of shades</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$shade</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_darken">
<div class="location">at line 108</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>darken</strong>(integer $shade)</code>
</h3>
<div class="details">
<p>Returns a copy of the current color, darkened by the specified number of shades</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$shade</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_grayscale">
<div class="location">at line 120</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>grayscale</strong>()</code>
</h3>
<div class="details">
<p>Returns a gray related to the current color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_isOpaque">
<div class="location">at line 128</div>
<code> public Boolean
<strong>isOpaque</strong>()</code>
</h3>
<div class="details">
<p>Checks if the current color is opaque</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>Boolean</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method___toString">
<div class="location">at line 138</div>
<code> public string
<strong>__toString</strong>()</code>
</h3>
<div class="details">
<p>Returns hex representation of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,571 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette\Color\RGB | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../../../classes.html">Classes</a></li>
<li><a href="../../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Class</div>
<h1><a href="../../../../Imagine/Image/Palette/Color.html">Imagine\Image\Palette\Color</a>\RGB</h1>
</div>
<div class="content">
<p>class <strong>RGB</strong> implements
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></p>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
</td>
<td class="last">
<a href="#method___construct">__construct</a>(<a href="../../../../Imagine/Image/Palette/RGB.html"><abbr title="Imagine\Image\Palette\RGB">RGB</abbr></a> $palette, array $color, $alpha)
<p>
</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
Integer
</td>
<td class="last">
<a href="#method_getValue">getValue</a>(string $component)
<p>Return the value of one of the component.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getRed">getRed</a>()
<p>Returns RED value of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getGreen">getGreen</a>()
<p>Returns GREEN value of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getBlue">getBlue</a>()
<p>Returns BLUE value of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
</td>
<td class="last">
<a href="#method_getPalette">getPalette</a>()
<p>Returns the palette attached to the current color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
integer
</td>
<td class="last">
<a href="#method_getAlpha">getAlpha</a>()
<p>Returns percentage of transparency of the color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_dissolve">dissolve</a>(integer $alpha)
<p>Returns a copy of current color, incrementing the alpha channel by the given amount</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_lighten">lighten</a>(integer $shade)
<p>Returns a copy of the current color, lightened by the specified number of shades</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_darken">darken</a>(integer $shade)
<p>Returns a copy of the current color, darkened by the specified number of shades</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_grayscale">grayscale</a>()
<p>Returns a gray related to the current color</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
Boolean
</td>
<td class="last">
<a href="#method_isOpaque">isOpaque</a>()
<p>Checks if the current color is opaque</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
string
</td>
<td class="last">
<a href="#method___toString">__toString</a>()
<p>Returns hex representation of the color</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method___construct">
<div class="location">at line 45</div>
<code> public
<strong>__construct</strong>(<a href="../../../../Imagine/Image/Palette/RGB.html"><abbr title="Imagine\Image\Palette\RGB">RGB</abbr></a> $palette, array $color, $alpha)</code>
</h3>
<div class="details">
<p>
</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/RGB.html"><abbr title="Imagine\Image\Palette\RGB">RGB</abbr></a></td>
<td>$palette</td>
<td>
</td>
</tr>
<tr>
<td>array</td>
<td>$color</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$alpha</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getValue">
<div class="location">at line 55</div>
<code> public Integer
<strong>getValue</strong>(string $component)</code>
</h3>
<div class="details">
<p>Return the value of one of the component.</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>string</td>
<td>$component</td>
<td>One of the ColorInterface::COLOR_* component</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td>Integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getRed">
<div class="location">at line 76</div>
<code> public integer
<strong>getRed</strong>()</code>
</h3>
<div class="details">
<p>Returns RED value of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getGreen">
<div class="location">at line 86</div>
<code> public integer
<strong>getGreen</strong>()</code>
</h3>
<div class="details">
<p>Returns GREEN value of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getBlue">
<div class="location">at line 96</div>
<code> public integer
<strong>getBlue</strong>()</code>
</h3>
<div class="details">
<p>Returns BLUE value of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getPalette">
<div class="location">at line 104</div>
<code> public <a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
<strong>getPalette</strong>()</code>
</h3>
<div class="details">
<p>Returns the palette attached to the current color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_getAlpha">
<div class="location">at line 112</div>
<code> public integer
<strong>getAlpha</strong>()</code>
</h3>
<div class="details">
<p>Returns percentage of transparency of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>integer</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_dissolve">
<div class="location">at line 120</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>dissolve</strong>(integer $alpha)</code>
</h3>
<div class="details">
<p>Returns a copy of current color, incrementing the alpha channel by the given amount</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$alpha</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_lighten">
<div class="location">at line 130</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>lighten</strong>(integer $shade)</code>
</h3>
<div class="details">
<p>Returns a copy of the current color, lightened by the specified number of shades</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$shade</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_darken">
<div class="location">at line 144</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>darken</strong>(integer $shade)</code>
</h3>
<div class="details">
<p>Returns a copy of the current color, darkened by the specified number of shades</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>integer</td>
<td>$shade</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_grayscale">
<div class="location">at line 158</div>
<code> public <a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>grayscale</strong>()</code>
</h3>
<div class="details">
<p>Returns a gray related to the current color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_isOpaque">
<div class="location">at line 168</div>
<code> public Boolean
<strong>isOpaque</strong>()</code>
</h3>
<div class="details">
<p>Checks if the current color is opaque</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>Boolean</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method___toString">
<div class="location">at line 178</div>
<code> public string
<strong>__toString</strong>()</code>
</h3>
<div class="details">
<p>Returns hex representation of the color</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,9 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette\Color | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css">
</head>
</html>

@ -1,215 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette\ColorParser | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../../classes.html">Classes</a></li>
<li><a href="../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Class</div>
<h1><a href="../../../Imagine/Image/Palette.html">Imagine\Image\Palette</a>\ColorParser</h1>
</div>
<div class="content">
<p>class <strong>ColorParser</strong></p>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
array
</td>
<td class="last">
<a href="#method_parseToRGB">parseToRGB</a>(string|array|integer $color)
<p>Parses a color to a RGB tuple</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
array
</td>
<td class="last">
<a href="#method_parseToCMYK">parseToCMYK</a>(string|array|integer $color)
<p>Parses a color to a CMYK tuple</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
array
</td>
<td class="last">
<a href="#method_parseToGrayscale">parseToGrayscale</a>(string|array|integer $color)
<p>Parses a color to a grayscale value</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method_parseToRGB">
<div class="location">at line 27</div>
<code> public array
<strong>parseToRGB</strong>(string|array|integer $color)</code>
</h3>
<div class="details">
<p>Parses a color to a RGB tuple</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>string|array|integer</td>
<td>$color</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td>array</td>
<td>
</td>
</tr>
</table>
<h4>Exceptions</h4>
<table>
<tr>
<td><a href="http://php.net/InvalidArgumentException"><abbr title="InvalidArgumentException">InvalidArgumentException</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_parseToCMYK">
<div class="location">at line 51</div>
<code> public array
<strong>parseToCMYK</strong>(string|array|integer $color)</code>
</h3>
<div class="details">
<p>Parses a color to a CMYK tuple</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>string|array|integer</td>
<td>$color</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td>array</td>
<td>
</td>
</tr>
</table>
<h4>Exceptions</h4>
<table>
<tr>
<td><a href="http://php.net/InvalidArgumentException"><abbr title="InvalidArgumentException">InvalidArgumentException</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_parseToGrayscale">
<div class="location">at line 82</div>
<code> public array
<strong>parseToGrayscale</strong>(string|array|integer $color)</code>
</h3>
<div class="details">
<p>Parses a color to a grayscale value</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>string|array|integer</td>
<td>$color</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td>array</td>
<td>
</td>
</tr>
</table>
<h4>Exceptions</h4>
<table>
<tr>
<td><a href="http://php.net/InvalidArgumentException"><abbr title="InvalidArgumentException">InvalidArgumentException</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,381 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette\Grayscale | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../../classes.html">Classes</a></li>
<li><a href="../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Class</div>
<h1><a href="../../../Imagine/Image/Palette.html">Imagine\Image\Palette</a>\Grayscale</h1>
</div>
<div class="content">
<p>class <strong>Grayscale</strong> implements
<a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></p>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
</td>
<td class="last">
<a href="#method___construct">__construct</a>()
<p>
</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
String
</td>
<td class="last">
<a href="#method_name">name</a>()
<p>Returns the name of this Palette, one of PaletteInterface::PALETTE_* constants</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
array
</td>
<td class="last">
<a href="#method_pixelDefinition">pixelDefinition</a>()
<p>Returns an array containing ColorInterface::COLOR_* constants that define the structure of colors for a pixel.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
Boolean
</td>
<td class="last">
<a href="#method_supportsAlpha">supportsAlpha</a>()
<p>Tells if alpha channel is supported in this palette</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
</td>
<td class="last">
<a href="#method_useProfile">useProfile</a>(<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a> $profile)
<p>Attachs an ICC profile to this Palette.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a>
</td>
<td class="last">
<a href="#method_profile">profile</a>()
<p>Returns the ICC profile attached to this Palette.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_color">color</a>(string|array|integer $color, integer|null $alpha = null)
<p>Returns a color given some values</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_blend">blend</a>(<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color1, <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color2, <abbr title="Imagine\Image\Palette\float">float</abbr> $amount)
<p>Blend two colors given an amount</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method___construct">
<div class="location">at line 37</div>
<code> public
<strong>__construct</strong>()</code>
</h3>
<div class="details">
<p>
</p>
<p>
</p>
<div class="tags">
</div>
</div>
<h3 id="method_name">
<div class="location">at line 45</div>
<code> public String
<strong>name</strong>()</code>
</h3>
<div class="details">
<p>Returns the name of this Palette, one of PaletteInterface::PALETTE_* constants</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>String</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_pixelDefinition">
<div class="location">at line 53</div>
<code> public array
<strong>pixelDefinition</strong>()</code>
</h3>
<div class="details">
<p>Returns an array containing ColorInterface::COLOR_* constants that define the structure of colors for a pixel.</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>array</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_supportsAlpha">
<div class="location">at line 63</div>
<code> public Boolean
<strong>supportsAlpha</strong>()</code>
</h3>
<div class="details">
<p>Tells if alpha channel is supported in this palette</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>Boolean</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_useProfile">
<div class="location">at line 71</div>
<code> public <a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
<strong>useProfile</strong>(<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a> $profile)</code>
</h3>
<div class="details">
<p>Attachs an ICC profile to this Palette.</p>
<p>(A default profile is provided by default)</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a></td>
<td>$profile</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_profile">
<div class="location">at line 81</div>
<code> public <a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a>
<strong>profile</strong>()</code>
</h3>
<div class="details">
<p>Returns the ICC profile attached to this Palette.</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_color">
<div class="location">at line 95</div>
<code> public <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>color</strong>(string|array|integer $color, integer|null $alpha = null)</code>
</h3>
<div class="details">
<p>Returns a color given some values</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>string|array|integer</td>
<td>$color</td>
<td>A color</td>
</tr>
<tr>
<td>integer|null</td>
<td>$alpha</td>
<td>Set alpha to null to disable it</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
<h4>Exceptions</h4>
<table>
<tr>
<td><a href="http://php.net/InvalidArgumentException"><abbr title="InvalidArgumentException">InvalidArgumentException</abbr></a></td>
<td>In case you pass an alpha value to a Palette that does not support alpha</td>
</tr>
</table>
</div>
</div>
<h3 id="method_blend">
<div class="location">at line 114</div>
<code> public <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>blend</strong>(<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color1, <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color2, <abbr title="Imagine\Image\Palette\float">float</abbr> $amount)</code>
</h3>
<div class="details">
<p>Blend two colors given an amount</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>$color1</td>
<td>
</td>
</tr>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>$color2</td>
<td>
</td>
</tr>
<tr>
<td><abbr title="Imagine\Image\Palette\float">float</abbr></td>
<td>$amount</td>
<td>The amount of color2 in color1</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,384 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette\PaletteInterface | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../../classes.html">Classes</a></li>
<li><a href="../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Interface</div>
<h1><a href="../../../Imagine/Image/Palette.html">Imagine\Image\Palette</a>\PaletteInterface</h1>
</div>
<div class="content">
<p>interface <strong>PaletteInterface</strong></p>
<h2>Constants</h2>
<table>
<tr>
<td>PALETTE_GRAYSCALE</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
<tr>
<td>PALETTE_RGB</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
<tr>
<td>PALETTE_CMYK</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
</table>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_color">color</a>(string|array|integer $color, integer|null $alpha = null)
<p>Returns a color given some values</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_blend">blend</a>(<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color1, <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color2, <abbr title="Imagine\Image\Palette\float">float</abbr> $amount)
<p>Blend two colors given an amount</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
</td>
<td class="last">
<a href="#method_useProfile">useProfile</a>(<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a> $profile)
<p>Attachs an ICC profile to this Palette.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a>
</td>
<td class="last">
<a href="#method_profile">profile</a>()
<p>Returns the ICC profile attached to this Palette.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
String
</td>
<td class="last">
<a href="#method_name">name</a>()
<p>Returns the name of this Palette, one of PaletteInterface::PALETTE_* constants</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
array
</td>
<td class="last">
<a href="#method_pixelDefinition">pixelDefinition</a>()
<p>Returns an array containing ColorInterface::COLOR_* constants that define the structure of colors for a pixel.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
Boolean
</td>
<td class="last">
<a href="#method_supportsAlpha">supportsAlpha</a>()
<p>Tells if alpha channel is supported in this palette</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method_color">
<div class="location">at line 34</div>
<code> public <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>color</strong>(string|array|integer $color, integer|null $alpha = null)</code>
</h3>
<div class="details">
<p>Returns a color given some values</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>string|array|integer</td>
<td>$color</td>
<td>A color</td>
</tr>
<tr>
<td>integer|null</td>
<td>$alpha</td>
<td>Set alpha to null to disable it</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
<h4>Exceptions</h4>
<table>
<tr>
<td><a href="http://php.net/InvalidArgumentException"><abbr title="InvalidArgumentException">InvalidArgumentException</abbr></a></td>
<td>In case you pass an alpha value to a Palette that does not support alpha</td>
</tr>
</table>
</div>
</div>
<h3 id="method_blend">
<div class="location">at line 45</div>
<code> public <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>blend</strong>(<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color1, <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color2, <abbr title="Imagine\Image\Palette\float">float</abbr> $amount)</code>
</h3>
<div class="details">
<p>Blend two colors given an amount</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>$color1</td>
<td>
</td>
</tr>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>$color2</td>
<td>
</td>
</tr>
<tr>
<td><abbr title="Imagine\Image\Palette\float">float</abbr></td>
<td>$amount</td>
<td>The amount of color2 in color1</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_useProfile">
<div class="location">at line 56</div>
<code> public <a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
<strong>useProfile</strong>(<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a> $profile)</code>
</h3>
<div class="details">
<p>Attachs an ICC profile to this Palette.</p>
<p>(A default profile is provided by default)</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a></td>
<td>$profile</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_profile">
<div class="location">at line 63</div>
<code> public <a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a>
<strong>profile</strong>()</code>
</h3>
<div class="details">
<p>Returns the ICC profile attached to this Palette.</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_name">
<div class="location">at line 71</div>
<code> public String
<strong>name</strong>()</code>
</h3>
<div class="details">
<p>Returns the name of this Palette, one of PaletteInterface::PALETTE_* constants</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>String</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_pixelDefinition">
<div class="location">at line 79</div>
<code> public array
<strong>pixelDefinition</strong>()</code>
</h3>
<div class="details">
<p>Returns an array containing ColorInterface::COLOR_* constants that define the structure of colors for a pixel.</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>array</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_supportsAlpha">
<div class="location">at line 86</div>
<code> public Boolean
<strong>supportsAlpha</strong>()</code>
</h3>
<div class="details">
<p>Tells if alpha channel is supported in this palette</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>Boolean</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,381 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette\RGB | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../../classes.html">Classes</a></li>
<li><a href="../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Class</div>
<h1><a href="../../../Imagine/Image/Palette.html">Imagine\Image\Palette</a>\RGB</h1>
</div>
<div class="content">
<p>class <strong>RGB</strong> implements
<a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></p>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
</td>
<td class="last">
<a href="#method___construct">__construct</a>()
<p>
</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
String
</td>
<td class="last">
<a href="#method_name">name</a>()
<p>Returns the name of this Palette, one of PaletteInterface::PALETTE_* constants</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
array
</td>
<td class="last">
<a href="#method_pixelDefinition">pixelDefinition</a>()
<p>Returns an array containing ColorInterface::COLOR_* constants that define the structure of colors for a pixel.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
Boolean
</td>
<td class="last">
<a href="#method_supportsAlpha">supportsAlpha</a>()
<p>Tells if alpha channel is supported in this palette</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
</td>
<td class="last">
<a href="#method_useProfile">useProfile</a>(<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a> $profile)
<p>Attachs an ICC profile to this Palette.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a>
</td>
<td class="last">
<a href="#method_profile">profile</a>()
<p>Returns the ICC profile attached to this Palette.</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_color">color</a>(string|array|integer $color, integer|null $alpha = null)
<p>Returns a color given some values</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
</td>
<td class="last">
<a href="#method_blend">blend</a>(<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color1, <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color2, <abbr title="Imagine\Image\Palette\float">float</abbr> $amount)
<p>Blend two colors given an amount</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method___construct">
<div class="location">at line 37</div>
<code> public
<strong>__construct</strong>()</code>
</h3>
<div class="details">
<p>
</p>
<p>
</p>
<div class="tags">
</div>
</div>
<h3 id="method_name">
<div class="location">at line 45</div>
<code> public String
<strong>name</strong>()</code>
</h3>
<div class="details">
<p>Returns the name of this Palette, one of PaletteInterface::PALETTE_* constants</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>String</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_pixelDefinition">
<div class="location">at line 53</div>
<code> public array
<strong>pixelDefinition</strong>()</code>
</h3>
<div class="details">
<p>Returns an array containing ColorInterface::COLOR_* constants that define the structure of colors for a pixel.</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>array</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_supportsAlpha">
<div class="location">at line 65</div>
<code> public Boolean
<strong>supportsAlpha</strong>()</code>
</h3>
<div class="details">
<p>Tells if alpha channel is supported in this palette</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>Boolean</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_useProfile">
<div class="location">at line 73</div>
<code> public <a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a>
<strong>useProfile</strong>(<a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a> $profile)</code>
</h3>
<div class="details">
<p>Attachs an ICC profile to this Palette.</p>
<p>(A default profile is provided by default)</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a></td>
<td>$profile</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/PaletteInterface.html"><abbr title="Imagine\Image\Palette\PaletteInterface">PaletteInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_profile">
<div class="location">at line 83</div>
<code> public <a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a>
<strong>profile</strong>()</code>
</h3>
<div class="details">
<p>Returns the ICC profile attached to this Palette.</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_color">
<div class="location">at line 97</div>
<code> public <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>color</strong>(string|array|integer $color, integer|null $alpha = null)</code>
</h3>
<div class="details">
<p>Returns a color given some values</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>string|array|integer</td>
<td>$color</td>
<td>A color</td>
</tr>
<tr>
<td>integer|null</td>
<td>$alpha</td>
<td>Set alpha to null to disable it</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
<h4>Exceptions</h4>
<table>
<tr>
<td><a href="http://php.net/InvalidArgumentException"><abbr title="InvalidArgumentException">InvalidArgumentException</abbr></a></td>
<td>In case you pass an alpha value to a Palette that does not support alpha</td>
</tr>
</table>
</div>
</div>
<h3 id="method_blend">
<div class="location">at line 116</div>
<code> public <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a>
<strong>blend</strong>(<a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color1, <a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a> $color2, <abbr title="Imagine\Image\Palette\float">float</abbr> $amount)</code>
</h3>
<div class="details">
<p>Blend two colors given an amount</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>$color1</td>
<td>
</td>
</tr>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>$color2</td>
<td>
</td>
</tr>
<tr>
<td><abbr title="Imagine\Image\Palette\float">float</abbr></td>
<td>$amount</td>
<td>The amount of color2 in color1</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../../Imagine/Image/Palette/Color/ColorInterface.html"><abbr title="Imagine\Image\Palette\Color\ColorInterface">ColorInterface</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,9 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Palette | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
</head>
</html>

@ -1,218 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\Profile | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../classes.html">Classes</a></li>
<li><a href="../../namespaces.html">Namespaces</a></li>
<li><a href="../../interfaces.html">Interfaces</a></li>
<li><a href="../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Class</div>
<h1><a href="../../Imagine/Image.html">Imagine\Image</a>\Profile</h1>
</div>
<div class="content">
<p>class <strong>Profile</strong> implements
<a href="../../Imagine/Image/ProfileInterface.html"><abbr title="Imagine\Image\ProfileInterface">ProfileInterface</abbr></a></p>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
</td>
<td class="last">
<a href="#method___construct">__construct</a>($name, $data)
<p>
</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
String
</td>
<td class="last">
<a href="#method_name">name</a>()
<p>Returns the name of the profile</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
String
</td>
<td class="last">
<a href="#method_data">data</a>()
<p>Returns the profile data</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
static&nbsp;<a href="../../Imagine/Image/Profile.html"><abbr title="Imagine\Image\Profile">Profile</abbr></a>
</td>
<td class="last">
<a href="#method_fromPath">fromPath</a>(String $path)
<p>Creates a profile from a path to a file</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method___construct">
<div class="location">at line 21</div>
<code> public
<strong>__construct</strong>($name, $data)</code>
</h3>
<div class="details">
<p>
</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td></td>
<td>$name</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$data</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_name">
<div class="location">at line 30</div>
<code> public String
<strong>name</strong>()</code>
</h3>
<div class="details">
<p>Returns the name of the profile</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>String</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_data">
<div class="location">at line 38</div>
<code> public String
<strong>data</strong>()</code>
</h3>
<div class="details">
<p>Returns the profile data</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>String</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_fromPath">
<div class="location">at line 52</div>
<code> static public <a href="../../Imagine/Image/Profile.html"><abbr title="Imagine\Image\Profile">Profile</abbr></a>
<strong>fromPath</strong>(String $path)</code>
</h3>
<div class="details">
<p>Creates a profile from a path to a file</p>
<p>
</p>
<div class="tags">
<h4>Parameters</h4>
<table>
<tr>
<td>String</td>
<td>$path</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table>
<tr>
<td><a href="../../Imagine/Image/Profile.html"><abbr title="Imagine\Image\Profile">Profile</abbr></a></td>
<td>
</td>
</tr>
</table>
<h4>Exceptions</h4>
<table>
<tr>
<td><a href="http://php.net/InvalidArgumentException"><abbr title="InvalidArgumentException">InvalidArgumentException</abbr></a></td>
<td>In case the provided path is not valid</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,116 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Imagine\Image\ProfileInterface | Imagine API</title>
<link rel="stylesheet" type="text/css" href="../../stylesheet.css">
</head>
<body id="class">
<div class="header">
<ul>
<li><a href="../../classes.html">Classes</a></li>
<li><a href="../../namespaces.html">Namespaces</a></li>
<li><a href="../../interfaces.html">Interfaces</a></li>
<li><a href="../../doc-index.html">Index</a></li>
</ul>
<div id="title">Imagine API</div>
<div class="type">Interface</div>
<h1><a href="../../Imagine/Image.html">Imagine\Image</a>\ProfileInterface</h1>
</div>
<div class="content">
<p>interface <strong>ProfileInterface</strong></p>
<h2>Methods</h2>
<table>
<tr>
<td class="type">
String
</td>
<td class="last">
<a href="#method_name">name</a>()
<p>Returns the name of the profile</p>
</td>
<td></td>
</tr>
<tr>
<td class="type">
String
</td>
<td class="last">
<a href="#method_data">data</a>()
<p>Returns the profile data</p>
</td>
<td></td>
</tr>
</table>
<h2>Details</h2>
<h3 id="method_name">
<div class="location">at line 21</div>
<code> public String
<strong>name</strong>()</code>
</h3>
<div class="details">
<p>Returns the name of the profile</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>String</td>
<td>
</td>
</tr>
</table>
</div>
</div>
<h3 id="method_data">
<div class="location">at line 28</div>
<code> public String
<strong>data</strong>()</code>
</h3>
<div class="details">
<p>Returns the profile data</p>
<p>
</p>
<div class="tags">
<h4>Return Value</h4>
<table>
<tr>
<td>String</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
</div>
</body>
</html>

@ -1,105 +0,0 @@
Colors
======
Imagine provides a fully-featured colors API with the Palette object :
Palette Class
+++++++++++++
Every image in Imagine is attached to a Palette. The palette handles the colors.
Imagine provides two palettes :
.. code-block:: php
<?php
$palette = new Imagine\Image\Palette\RGB();
// or
$palette = new Imagine\Image\Palette\CMYK();
When creating a new Image, the default RGB palette is used. It can be easily customized. For example the following code creates a new Image object with a white background and a CMYK palette.
.. code-block:: php
<?php
$palette = new Imagine\Image\Palette\CMYK();
$imagine->create(new Imagine\Image\Box(10, 10), $palette->color('#FFFFFF'));
You can switch your palette at any moment, for example to turn a CMYK image in RGB mode :
.. code-block:: php
<?php
$image = $imagine->open('my-cmyk-jpg.jpg');
$image->usePalette(new Imagine\Image\Palette\RGB())
->save('my-rgb-jpg.jpg');
.. NOTE::
Switching to a palette is the same a changing the colorspace.
About colorspaces support
+++++++++++++++++++++++++
Drivers do not handle colorspace the same way.
Whereas GD only supports RGB images, Imagick supports CMYK, RGB and Grayscale
colorspaces. Gmagick only supports CMYK and RGB colorspaces.
Color Class
+++++++++++
Color is a class in Imagine, and is created through a palette with two arguments in its constructor: the RGB color code and a transparency percentage. The following examples are equivalent ways of defining a fully-transparent white color.
.. code-block:: php
<?php
$white = $palette->color('fff', 100);
$white = $palette->color('ffffff', 100);
$white = $palette->color('#fff', 100);
$white = $palette->color('#ffffff', 100);
$white = $palette->color(0xFFFFFF, 100);
$white = $palette->color(array(255, 255, 255), 100);
.. NOTE::
CMYK colors does not support alpha parameters.
After you have instantiated an RGB color, you can easily get its Red, Green, Blue and Alpha (transparency) values:
.. code-block:: php
<?php
var_dump(array(
'R' => $white->getRed(),
'G' => $white->getGreen(),
'B' => $white->getBlue(),
'A' => $white->getAlpha()
));
The same behavior is available for CMYK colors :
.. code-block:: php
<?php
var_dump(array(
'C' => $white->getCyan(),
'M' => $white->getMagenta(),
'Y' => $white->getYellow(),
'K' => $white->getKeyline()
));
Profile Class
+++++++++++++
You can apply ICC profile on any Image class with the ``profile`` method :
.. code-block:: php
<?php
$profile = Image\Image\Profile::fromPath('your-ICC-profile.icc');
$image->profile($profile)
->save('my-rgb-jpg-profiled.jpg');

@ -1,57 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Filter\Basic;
use Imagine\Image\ImageInterface;
use Imagine\Image\Palette\RGB;
use Imagine\Filter\FilterInterface;
/**
* A filter to render web-optimized images
*/
class WebOptimization implements FilterInterface
{
private $palette;
private $path;
private $options;
public function __construct($path = null, array $options = array())
{
$this->path = $path;
$this->options = array_replace(array(
'resolution-units' => ImageInterface::RESOLUTION_PIXELSPERINCH,
'resolution-y' => 72,
'resolution-x' => 72,
), $options);
$this->palette = new RGB();
}
/**
* {@inheritdoc}
*/
public function apply(ImageInterface $image)
{
$image
->usePalette($this->palette)
->strip();
if (is_callable($this->path)) {
$path = call_user_func($this->path, $image);
} elseif (null !== $this->path) {
$path = $this->path;
} else {
return $image;
}
return $image->save($path, $this->options);
}
}

@ -1,122 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Image\Palette;
use Imagine\Image\Palette\Color\CMYK as CMYKColor;
use Imagine\Image\Palette\Color\ColorInterface;
use Imagine\Exception\RuntimeException;
use Imagine\Exception\InvalidArgumentException;
use Imagine\Image\Profile;
use Imagine\Image\ProfileInterface;
class CMYK implements PaletteInterface
{
private $parser;
private $profile;
private static $colors = array();
public function __construct()
{
$this->parser = new ColorParser();
}
/**
* {@inheritdoc}
*/
public function name()
{
return PaletteInterface::PALETTE_CMYK;
}
/**
* {@inheritdoc}
*/
public function pixelDefinition()
{
return array(
ColorInterface::COLOR_CYAN,
ColorInterface::COLOR_MAGENTA,
ColorInterface::COLOR_YELLOW,
ColorInterface::COLOR_KEYLINE,
);
}
/**
* {@inheritdoc}
*/
public function supportsAlpha()
{
return false;
}
/**
* {@inheritdoc}
*/
public function color($color, $alpha = null)
{
if (null !== $alpha) {
throw new InvalidArgumentException(
'CMYK palette does not support alpha'
);
}
$color = $this->parser->parseToCMYK($color);
$index = sprintf('cmyk(%d, %d, %d, %d)', $color[0], $color[1], $color[2], $color[3]);
if (false === array_key_exists($index, self::$colors)) {
self::$colors[$index] = new CMYKColor($this, $color);
}
return self::$colors[$index];
}
/**
* {@inheritdoc}
*/
public function blend(ColorInterface $color1, ColorInterface $color2, $amount)
{
if (!$color1 instanceof CMYKColor || ! $color2 instanceof CMYKColor) {
throw new RuntimeException('CMYK palette can only blend CMYK colors');
}
return $this->color(array(
min(100, $color1->getCyan() + $color2->getCyan() * $amount),
min(100, $color1->getMagenta() + $color2->getMagenta() * $amount),
min(100, $color1->getYellow() + $color2->getYellow() * $amount),
min(100, $color1->getKeyline() + $color2->getKeyline() * $amount),
));
}
/**
* {@inheritdoc}
*/
public function useProfile(ProfileInterface $profile)
{
$this->profile = $profile;
return $this;
}
/**
* {@inheritdoc}
*/
public function profile()
{
if (!$this->profile) {
$this->profile = Profile::fromPath(
__DIR__ . '/../../resources/Adobe/CMYK/USWebUncoated.icc'
);
}
return $this->profile;
}
}

@ -1,225 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Image\Palette\Color;
use Imagine\Image\Palette\CMYK as CMYKPalette;
use Imagine\Exception\RuntimeException;
use Imagine\Exception\InvalidArgumentException;
final class CMYK implements ColorInterface
{
/**
* @var integer
*/
private $c;
/**
* @var integer
*/
private $m;
/**
* @var integer
*/
private $y;
/**
* @var integer
*/
private $k;
/**
*
* @var CMYK
*/
private $palette;
public function __construct(CMYKPalette $palette, array $color)
{
$this->palette = $palette;
$this->setColor($color);
}
/**
* {@inheritdoc}
*/
public function getValue($component)
{
switch ($component) {
case ColorInterface::COLOR_CYAN:
return $this->getCyan();
case ColorInterface::COLOR_MAGENTA:
return $this->getMagenta();
case ColorInterface::COLOR_YELLOW:
return $this->getYellow();
case ColorInterface::COLOR_KEYLINE:
return $this->getKeyline();
default:
throw new InvalidArgumentException(sprintf(
'Color component %s is not valid', $component
));
}
}
/**
* Returns Cyan value of the color
*
* @return integer
*/
public function getCyan()
{
return $this->c;
}
/**
* Returns Magenta value of the color
*
* @return integer
*/
public function getMagenta()
{
return $this->m;
}
/**
* Returns Yellow value of the color
*
* @return integer
*/
public function getYellow()
{
return $this->y;
}
/**
* Returns Key value of the color
*
* @return integer
*/
public function getKeyline()
{
return $this->k;
}
/**
* {@inheritdoc}
*/
public function getPalette()
{
return $this->palette;
}
/**
* {@inheritdoc}
*/
public function getAlpha()
{
return null;
}
/**
* {@inheritdoc}
*/
public function dissolve($alpha)
{
throw new RuntimeException('CMYK does not support dissolution');
}
/**
* {@inheritdoc}
*/
public function lighten($shade)
{
return $this->palette->color(
array(
$this->c,
$this->m,
$this->y,
max(0, $this->k - $shade),
)
);
}
/**
* {@inheritdoc}
*/
public function darken($shade)
{
return $this->palette->color(
array(
$this->c,
$this->m,
$this->y,
min(100, $this->k + $shade),
)
);
}
/**
* {@inheritdoc}
*/
public function grayscale()
{
$color = array(
$this->c * (1 - $this->k / 100) + $this->k,
$this->m * (1 - $this->k / 100) + $this->k,
$this->y * (1 - $this->k / 100) + $this->k,
);
$gray = min(100, round(0.299 * $color[0] + 0.587 * $color[1] + 0.114 * $color[2]));
return $this->palette->color(array($gray, $gray, $gray, $this->k));
}
/**
* {@inheritdoc}
*/
public function isOpaque()
{
return true;
}
/**
* Returns hex representation of the color
*
* @return string
*/
public function __toString()
{
return sprintf('cmyk(%d%%, %d%%, %d%%, %d%%)', $this->c, $this->m, $this->y, $this->k);
}
/**
* Internal, Performs checks for color validity (an of array(C, M, Y, K))
*
* @param array $color
*
* @throws InvalidArgumentException
*/
private function setColor(array $color)
{
if (count($color) !== 4) {
throw new InvalidArgumentException(
'Color argument must look like array(C, M, Y, K), ' .
'where C, M, Y, K are the integer values between 0 and 255 for ' .
'cyan, magenta, yellow and black color indexes accordingly'
);
}
$colors = array_values($color);
array_walk($colors, function ($color) {
return max(0, min(100, $color));
});
list($this->c, $this->m, $this->y, $this->k) = $colors;
}
}

@ -1,95 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Image\Palette\Color;
use Imagine\Image\Palette\PaletteInterface;
interface ColorInterface
{
const COLOR_RED = 'red';
const COLOR_GREEN = 'green';
const COLOR_BLUE = 'blue';
const COLOR_CYAN = 'cyan';
const COLOR_MAGENTA = 'magenta';
const COLOR_YELLOW = 'yellow';
const COLOR_KEYLINE = 'keyline';
const COLOR_GRAY = 'gray';
/**
* Return the value of one of the component.
*
* @param string $component One of the ColorInterface::COLOR_* component
*
* @return Integer
*/
public function getValue($component);
/**
* Returns percentage of transparency of the color
*
* @return integer
*/
public function getAlpha();
/**
* Returns the palette attached to the current color
*
* @return PaletteInterface
*/
public function getPalette();
/**
* Returns a copy of current color, incrementing the alpha channel by the
* given amount
*
* @param integer $alpha
*
* @return ColorInterface
*/
public function dissolve($alpha);
/**
* Returns a copy of the current color, lightened by the specified number
* of shades
*
* @param integer $shade
*
* @return ColorInterface
*/
public function lighten($shade);
/**
* Returns a copy of the current color, darkened by the specified number of
* shades
*
* @param integer $shade
*
* @return ColorInterface
*/
public function darken($shade);
/**
* Returns a gray related to the current color
*
* @return ColorInterface
*/
public function grayscale();
/**
* Checks if the current color is opaque
*
* @return Boolean
*/
public function isOpaque();
}

@ -1,180 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Image\Palette\Color;
use Imagine\Image\Palette\Grayscale;
use Imagine\Exception\InvalidArgumentException;
final class Gray implements ColorInterface
{
/**
* @var integer
*/
private $gray;
/**
* @var integer
*/
private $alpha;
/**
*
* @var Grayscale
*/
private $palette;
public function __construct(Grayscale $palette, array $color, $alpha)
{
$this->palette = $palette;
$this->setColor($color);
$this->setAlpha($alpha);
}
/**
* {@inheritdoc}
*/
public function getValue($component)
{
switch ($component) {
case ColorInterface::COLOR_GRAY:
return $this->getGray();
default:
throw new InvalidArgumentException(sprintf(
'Color component %s is not valid', $component
));
}
}
/**
* Returns Gray value of the color
*
* @return integer
*/
public function getGray()
{
return $this->gray;
}
/**
* {@inheritdoc}
*/
public function getPalette()
{
return $this->palette;
}
/**
* {@inheritdoc}
*/
public function getAlpha()
{
return $this->alpha;
}
/**
* {@inheritdoc}
*/
public function dissolve($alpha)
{
return $this->palette->color(
array($this->gray), $this->alpha + $alpha
);
}
/**
* {@inheritdoc}
*/
public function lighten($shade)
{
return $this->palette->color(
array(
min(255, $this->gray + $shade),
), $this->alpha
);
}
/**
* {@inheritdoc}
*/
public function darken($shade)
{
return $this->palette->color(
array(
max(0, $this->gray - $shade),
), $this->alpha
);
}
/**
* {@inheritdoc}
*/
public function grayscale()
{
return $this;
}
/**
* {@inheritdoc}
*/
public function isOpaque()
{
return 0 === $this->alpha;
}
/**
* Returns hex representation of the color
*
* @return string
*/
public function __toString()
{
return sprintf('#%02x%02x%02x', $this->gray, $this->gray, $this->gray);
}
/**
* Performs checks for validity of given alpha value and sets it
*
* @param integer $alpha
*
* @throws InvalidArgumentException
*/
private function setAlpha($alpha)
{
if (!is_int($alpha) || $alpha < 0 || $alpha > 100) {
throw new InvalidArgumentException(sprintf(
'Alpha must be an integer between 0 and 100, %s given', $alpha
));
}
$this->alpha = $alpha;
}
/**
* Performs checks for color validity (array of array(gray))
*
* @param array $color
*
* @throws InvalidArgumentException
*/
private function setColor(array $color)
{
if (count($color) !== 1) {
throw new InvalidArgumentException(
'Color argument must look like array(gray), ' .
'where gray is the integer value between 0 and 255 for ' .
'the grayscale'
);
}
list($this->gray) = array_values($color);
}
}

@ -1,224 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Image\Palette\Color;
use Imagine\Image\Palette\RGB as RGBPalette;
use Imagine\Exception\InvalidArgumentException;
final class RGB implements ColorInterface
{
/**
* @var integer
*/
private $r;
/**
* @var integer
*/
private $g;
/**
* @var integer
*/
private $b;
/**
* @var integer
*/
private $alpha;
/**
*
* @var RGBPalette
*/
private $palette;
public function __construct(RGBPalette $palette, array $color, $alpha)
{
$this->palette = $palette;
$this->setColor($color);
$this->setAlpha($alpha);
}
/**
* {@inheritdoc}
*/
public function getValue($component)
{
switch ($component) {
case ColorInterface::COLOR_RED:
return $this->getRed();
case ColorInterface::COLOR_GREEN:
return $this->getGreen();
case ColorInterface::COLOR_BLUE:
return $this->getBlue();
default:
throw new InvalidArgumentException(sprintf(
'Color component %s is not valid', $component
));
}
}
/**
* Returns RED value of the color
*
* @return integer
*/
public function getRed()
{
return $this->r;
}
/**
* Returns GREEN value of the color
*
* @return integer
*/
public function getGreen()
{
return $this->g;
}
/**
* Returns BLUE value of the color
*
* @return integer
*/
public function getBlue()
{
return $this->b;
}
/**
* {@inheritdoc}
*/
public function getPalette()
{
return $this->palette;
}
/**
* {@inheritdoc}
*/
public function getAlpha()
{
return $this->alpha;
}
/**
* {@inheritdoc}
*/
public function dissolve($alpha)
{
return $this->palette->color(
array($this->r, $this->g, $this->b), $this->alpha + $alpha
);
}
/**
* {@inheritdoc}
*/
public function lighten($shade)
{
return $this->palette->color(
array(
min(255, $this->r + $shade),
min(255, $this->g + $shade),
min(255, $this->b + $shade),
), $this->alpha
);
}
/**
* {@inheritdoc}
*/
public function darken($shade)
{
return $this->palette->color(
array(
max(0, $this->r - $shade),
max(0, $this->g - $shade),
max(0, $this->b - $shade),
), $this->alpha
);
}
/**
* {@inheritdoc}
*/
public function grayscale()
{
$gray = min(255, round(0.299 * $this->getRed() + 0.114 * $this->getBlue() + 0.587 * $this->getGreen()));
return $this->palette->color(array($gray, $gray, $gray), $this->alpha);
}
/**
* {@inheritdoc}
*/
public function isOpaque()
{
return 0 === $this->alpha;
}
/**
* Returns hex representation of the color
*
* @return string
*/
public function __toString()
{
return sprintf('#%02x%02x%02x', $this->r, $this->g, $this->b);
}
/**
* Internal
*
* Performs checks for validity of given alpha value and sets it
*
* @param integer $alpha
*
* @throws InvalidArgumentException
*/
private function setAlpha($alpha)
{
if (!is_int($alpha) || $alpha < 0 || $alpha > 100) {
throw new InvalidArgumentException(sprintf(
'Alpha must be an integer between 0 and 100, %s given', $alpha
));
}
$this->alpha = $alpha;
}
/**
* Internal
*
* Performs checks for color validity (array of array(R, G, B))
*
* @param array $color
*
* @throws InvalidArgumentException
*/
private function setColor(array $color)
{
if (count($color) !== 3) {
throw new InvalidArgumentException(
'Color argument must look like array(R, G, B), ' .
'where R, G, B are the integer values between 0 and 255 for ' .
'red, green and blue color indexes accordingly'
);
}
list($this->r, $this->g, $this->b) = array_values($color);
}
}

@ -1,176 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Image\Palette;
use Imagine\Exception\InvalidArgumentException;
class ColorParser
{
/**
* Parses a color to a RGB tuple
*
* @param string|array|integer $color
*
* @return array
*
* @throws InvalidArgumentException
*/
public function parseToRGB($color)
{
$color = $this->parse($color);
if (4 === count($color)) {
$color = array(
255 * (1 - $color[0] / 100) * (1 - $color[3] / 100),
255 * (1 - $color[1] / 100) * (1 - $color[3] / 100),
255 * (1 - $color[2] / 100) * (1 - $color[3] / 100),
);
}
return $color;
}
/**
* Parses a color to a CMYK tuple
*
* @param string|array|integer $color
*
* @return array
*
* @throws InvalidArgumentException
*/
public function parseToCMYK($color)
{
$color = $this->parse($color);
if (3 === count($color)) {
$r = $color[0] / 255;
$g = $color[1] / 255;
$b = $color[2] / 255;
$k = 1 - max($r, $g, $b);
$color = array(
1 === $k ? 0 : round((1 - $r - $k) / (1- $k) * 100),
1 === $k ? 0 : round((1 - $g - $k) / (1- $k) * 100),
1 === $k ? 0 : round((1 - $b - $k) / (1- $k) * 100),
round($k * 100)
);
}
return $color;
}
/**
* Parses a color to a grayscale value
*
* @param string|array|integer $color
*
* @return array
*
* @throws InvalidArgumentException
*/
public function parseToGrayscale($color)
{
if (is_array($color) && 1 === count($color)) {
return array_values($color);
}
$color = array_unique($this->parse($color));
if (1 !== count($color)) {
throw new InvalidArgumentException(
'The provided color has different values of red, green and ' .
'blue components. Grayscale colors must have the same values ' .
'for these.'
);
}
return $color;
}
/**
* Parses a color
*
* @param string|array|integer $color
*
* @return array
*
* @throws InvalidArgumentException
*/
private function parse($color)
{
if (!is_string($color) && !is_array($color) && !is_int($color)) {
throw new InvalidArgumentException(sprintf(
'Color must be specified as a hexadecimal string, array ' .
'or integer, %s given', gettype($color)
));
}
if (is_array($color)) {
if (3 === count($color) || 4 === count($color)) {
return array_values($color);
}
throw new InvalidArgumentException(
'Color argument if array, must look like array(R, G, B), ' .
'or array(C, M, Y, K) where R, G, B are the integer values ' .
'between 0 and 255 for red, green and blue or cyan, magenta, '.
'yellow and black color indexes accordingly'
);
}
if (is_string($color)) {
if (0 === strpos($color, 'cmyk(')) {
$substrColor = substr($color, 5, strlen($color) - 6);
$components = array_map(function ($component) {
return round(trim($component, ' %'));
}, explode(',', $substrColor));
if (count($components) !== 4) {
throw new InvalidArgumentException(sprintf(
'Unable to parse color %s', $color
));
}
return $components;
} else {
$color = ltrim($color, '#');
if (strlen($color) !== 3 && strlen($color) !== 6) {
throw new InvalidArgumentException(sprintf(
'Color must be a hex value in regular (6 characters) or ' .
'short (3 characters) notation, "%s" given', $color
));
}
if (strlen($color) === 3) {
$color = $color[0] . $color[0] .
$color[1] . $color[1] .
$color[2] . $color[2];
}
$color = array_map('hexdec', str_split($color, 2));
}
}
if (is_int($color)) {
$color = array(
255 & ($color >> 16),
255 & ($color >> 8),
255 & $color
);
}
return $color;
}
}

@ -1,127 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Image\Palette;
use Imagine\Image\Palette\Color\Gray as GrayColor;
use Imagine\Image\Palette\Color\ColorInterface;
use Imagine\Image\ProfileInterface;
use Imagine\Image\Profile;
use Imagine\Exception\RuntimeException;
class Grayscale implements PaletteInterface
{
/**
* @var ColorParser
*/
private $parser;
/**
* @var ProfileInterface
*/
protected $profile;
/**
* @var array
*/
protected static $colors = array();
public function __construct()
{
$this->parser = new ColorParser();
}
/**
* {@inheritdoc}
*/
public function name()
{
return PaletteInterface::PALETTE_GRAYSCALE;
}
/**
* {@inheritdoc}
*/
public function pixelDefinition()
{
return array(
ColorInterface::COLOR_GRAY,
);
}
/**
* {@inheritdoc}
*/
public function supportsAlpha()
{
return true;
}
/**
* {@inheritdoc}
*/
public function useProfile(ProfileInterface $profile)
{
$this->profile = $profile;
return $this;
}
/**
* {@inheritdoc}
*/
public function profile()
{
if (!$this->profile) {
$this->profile = Profile::fromPath(
__DIR__ . '/../../resources/colormanagement.org/ISOcoated_v2_grey1c_bas.ICC'
);
}
return $this->profile;
}
/**
* {@inheritdoc}
*/
public function color($color, $alpha = null)
{
if (null === $alpha) {
$alpha = 0;
}
$color = $this->parser->parseToGrayscale($color);
$index = sprintf('#%02x%02x%02x-%d', $color[0], $color[0], $color[0], $alpha);
if (false === array_key_exists($index, static::$colors)) {
static::$colors[$index] = new GrayColor($this, $color, $alpha);
}
return static::$colors[$index];
}
/**
* {@inheritdoc}
*/
public function blend(ColorInterface $color1, ColorInterface $color2, $amount)
{
if (!$color1 instanceof GrayColor || ! $color2 instanceof GrayColor) {
throw new RuntimeException('Grayscale palette can only blend Grayscale colors');
}
return $this->color(
array(
(int) min(255, min($color1->getGray(), $color2->getGray()) + round(abs($color2->getGray() - $color1->getGray()) * $amount)),
),
(int) min(100, min($color1->getAlpha(), $color2->getAlpha()) + round(abs($color2->getAlpha() - $color1->getAlpha()) * $amount))
);
}
}

@ -1,87 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Image\Palette;
use Imagine\Image\ProfileInterface;
use Imagine\Image\Palette\Color\ColorInterface;
interface PaletteInterface
{
const PALETTE_GRAYSCALE = 'gray';
const PALETTE_RGB = 'rgb';
const PALETTE_CMYK = 'cmyk';
/**
* Returns a color given some values
*
* @param string|array|integer $color A color
* @param integer|null $alpha Set alpha to null to disable it
*
* @return ColorInterface
*
* @throws InvalidArgumentException In case you pass an alpha value to a
* Palette that does not support alpha
*/
public function color($color, $alpha = null);
/**
* Blend two colors given an amount
*
* @param ColorInterface $color1
* @param ColorInterface $color2
* @param float $amount The amount of color2 in color1
*
* @return ColorInterface
*/
public function blend(ColorInterface $color1, ColorInterface $color2, $amount);
/**
* Attachs an ICC profile to this Palette.
*
* (A default profile is provided by default)
*
* @param ProfileInterface $profile
*
* @return PaletteInterface
*/
public function useProfile(ProfileInterface $profile);
/**
* Returns the ICC profile attached to this Palette.
*
* @return ProfileInterface
*/
public function profile();
/**
* Returns the name of this Palette, one of PaletteInterface::PALETTE_*
* constants
*
* @return String
*/
public function name();
/**
* Returns an array containing ColorInterface::COLOR_* constants that
* define the structure of colors for a pixel.
*
* @return array
*/
public function pixelDefinition();
/**
* Tells if alpha channel is supported in this palette
*
* @return Boolean
*/
public function supportsAlpha();
}

@ -1,131 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Image\Palette;
use Imagine\Image\Palette\Color\RGB as RGBColor;
use Imagine\Image\Palette\Color\ColorInterface;
use Imagine\Image\ProfileInterface;
use Imagine\Image\Profile;
use Imagine\Exception\RuntimeException;
class RGB implements PaletteInterface
{
/**
* @var ColorParser
*/
private $parser;
/**
* @var ProfileInterface
*/
protected $profile;
/**
* @var array
*/
protected static $colors = array();
public function __construct()
{
$this->parser = new ColorParser();
}
/**
* {@inheritdoc}
*/
public function name()
{
return PaletteInterface::PALETTE_RGB;
}
/**
* {@inheritdoc}
*/
public function pixelDefinition()
{
return array(
ColorInterface::COLOR_RED,
ColorInterface::COLOR_GREEN,
ColorInterface::COLOR_BLUE,
);
}
/**
* {@inheritdoc}
*/
public function supportsAlpha()
{
return true;
}
/**
* {@inheritdoc}
*/
public function useProfile(ProfileInterface $profile)
{
$this->profile = $profile;
return $this;
}
/**
* {@inheritdoc}
*/
public function profile()
{
if (!$this->profile) {
$this->profile = Profile::fromPath(
__DIR__ . '/../../resources/Adobe/RGB/AdobeRGB1998.icc'
);
}
return $this->profile;
}
/**
* {@inheritdoc}
*/
public function color($color, $alpha = null)
{
if (null === $alpha) {
$alpha = 0;
}
$color = $this->parser->parseToRGB($color);
$index = sprintf('#%02x%02x%02x-%d', $color[0], $color[1], $color[2], $alpha);
if (false === array_key_exists($index, static::$colors)) {
static::$colors[$index] = new RGBColor($this, $color, $alpha);
}
return static::$colors[$index];
}
/**
* {@inheritdoc}
*/
public function blend(ColorInterface $color1, ColorInterface $color2, $amount)
{
if (!$color1 instanceof RGBColor || ! $color2 instanceof RGBColor) {
throw new RuntimeException('RGB palette can only blend RGB colors');
}
return $this->color(
array(
(int) min(255, min($color1->getRed(), $color2->getRed()) + round(abs($color2->getRed() - $color1->getRed()) * $amount)),
(int) min(255, min($color1->getGreen(), $color2->getGreen()) + round(abs($color2->getGreen() - $color1->getGreen()) * $amount)),
(int) min(255, min($color1->getBlue(), $color2->getBlue()) + round(abs($color2->getBlue() - $color1->getBlue()) * $amount)),
),
(int) min(100, min($color1->getAlpha(), $color2->getAlpha()) + round(abs($color2->getAlpha() - $color1->getAlpha()) * $amount))
);
}
}

@ -1,63 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Image;
use Imagine\Exception\InvalidArgumentException;
class Profile implements ProfileInterface
{
private $data;
private $name;
public function __construct($name, $data)
{
$this->name = $name;
$this->data = $data;
}
/**
* {@inheritdoc}
*/
public function name()
{
return $this->name;
}
/**
* {@inheritdoc}
*/
public function data()
{
return $this->data;
}
/**
* Creates a profile from a path to a file
*
* @param String $path
*
* @return Profile
*
* @throws InvalidArgumentException In case the provided path is not valid
*/
public static function fromPath($path)
{
if (!file_exists($path) || !is_file($path) || !is_readable($path)) {
throw new InvalidArgumentException(sprintf(
'Path %s is an invalid profile file or is not readable',
$path
));
}
return new static(basename($path), file_get_contents($path));
}
}

@ -1,29 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Image;
interface ProfileInterface
{
/**
* Returns the name of the profile
*
* @return String
*/
public function name();
/**
* Returns the profile data
*
* @return String
*/
public function data();
}

@ -1,114 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Filter\Basic;
use Imagine\Image\ImageInterface;
use Imagine\Filter\Basic\WebOptimization;
use Imagine\Test\Filter\FilterTestCase;
class WebOptimizationTest extends FilterTestCase
{
public function testShouldNotSave()
{
$image = $this->getImage();
$filter = new WebOptimization();
$image->expects($this->once())
->method('usePalette')
->with($this->isInstanceOf('Imagine\Image\Palette\RGB'))
->will($this->returnValue($image));
$image->expects($this->once())
->method('strip')
->will($this->returnValue($image));
$image->expects($this->never())
->method('save');
$this->assertSame($image, $filter->apply($image));
}
public function testShouldSaveWithCallbackAndCustomOption()
{
$image = $this->getImage();
$result = '/path/to/ploum';
$path = function (ImageInterface $image) use ($result) { return $result; };
$filter = new WebOptimization($path, array(
'custom-option' => 'custom-value',
'resolution-y' => 100,
));
$capturedOptions = null;
$image->expects($this->once())
->method('usePalette')
->with($this->isInstanceOf('Imagine\Image\Palette\RGB'))
->will($this->returnValue($image));
$image->expects($this->once())
->method('strip')
->will($this->returnValue($image));
$image->expects($this->once())
->method('save')
->with($this->equalTo($result), $this->isType('array'))
->will($this->returnCallback(function ($path, $options) use (&$capturedOptions, $image) {
$capturedOptions = $options;
return $image;
}));
$this->assertSame($image, $filter->apply($image));
$this->assertCount(4, $capturedOptions);
$this->assertEquals('custom-value', $capturedOptions['custom-option']);
$this->assertEquals(ImageInterface::RESOLUTION_PIXELSPERINCH, $capturedOptions['resolution-units']);
$this->assertEquals(72, $capturedOptions['resolution-x']);
$this->assertEquals(100, $capturedOptions['resolution-y']);
}
public function testShouldSaveWithPathAndCustomOption()
{
$image = $this->getImage();
$path = '/path/to/dest';
$filter = new WebOptimization($path, array(
'custom-option' => 'custom-value',
'resolution-y' => 100,
));
$capturedOptions = null;
$image->expects($this->once())
->method('usePalette')
->with($this->isInstanceOf('Imagine\Image\Palette\RGB'))
->will($this->returnValue($image));
$image->expects($this->once())
->method('strip')
->will($this->returnValue($image));
$image->expects($this->once())
->method('save')
->with($this->equalTo($path), $this->isType('array'))
->will($this->returnCallback(function ($path, $options) use (&$capturedOptions, $image) {
$capturedOptions = $options;
return $image;
}));
$this->assertSame($image, $filter->apply($image));
$this->assertCount(4, $capturedOptions);
$this->assertEquals('custom-value', $capturedOptions['custom-option']);
$this->assertEquals(ImageInterface::RESOLUTION_PIXELSPERINCH, $capturedOptions['resolution-units']);
$this->assertEquals(72, $capturedOptions['resolution-x']);
$this->assertEquals(100, $capturedOptions['resolution-y']);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

@ -1,111 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Test\Image\Palette;
use Imagine\Test\ImagineTestCase;
use Imagine\Image\Palette\Color\ColorInterface;
abstract class AbstractPaletteTest extends ImagineTestCase
{
/**
* @dataProvider provideColorAndAlphaTuples
*/
public function testColor($expected, $color, $alpha)
{
$result = $this->getPalette()->color($color, $alpha);
$this->assertInstanceOf('Imagine\Image\Palette\Color\ColorInterface', $result);
$this->assertEquals((string) $expected, (string) $result);
}
/**
* @dataProvider provideColorAndAlpha
*/
public function testColorIsCached($color, $alpha)
{
$this->assertSame($this->getPalette()->color($color, $alpha), $this->getPalette()->color($color, $alpha));
}
/**
* @dataProvider provideColorAndAlpha
*/
public function testColorWithDifferentAlphasAreNotSame($color, $alpha)
{
$this->assertNotSame($this->getPalette()->color($color, 2), $this->getPalette()->color($color, 0));
}
/**
* @dataProvider provideColorsForBlending
*/
public function testBlend($expected, $color1, $color2, $amount)
{
$result = $this->getPalette()->blend($color1, $color2, $amount);
$this->assertInstanceOf('Imagine\Image\Palette\Color\ColorInterface', $result);
$this->assertEquals((string) $expected, (string) $result);
}
public function testUseProfile()
{
$this->getMock('Imagine\Image\ProfileInterface');
$palette = $this->getPalette();
$new = $this->getMock('Imagine\Image\ProfileInterface');
$palette->useProfile($new);
$this->assertEquals($new, $palette->profile());
}
public function testProfile()
{
$this->assertInstanceOf('Imagine\Image\ProfileInterface', $this->getPalette()->profile());
}
public function testName()
{
$this->assertInternalType('string', $this->getPalette()->name());
}
public function testPixelDefinition()
{
$this->assertInternalType('array', $this->getPalette()->pixelDefinition());
$available = array(
ColorInterface::COLOR_RED,
ColorInterface::COLOR_GREEN,
ColorInterface::COLOR_BLUE,
ColorInterface::COLOR_CYAN,
ColorInterface::COLOR_MAGENTA,
ColorInterface::COLOR_YELLOW,
ColorInterface::COLOR_KEYLINE,
ColorInterface::COLOR_GRAY,
);
foreach ($this->getPalette()->pixelDefinition() as $color) {
$this->assertTrue(in_array($color, $available));
}
}
public function testSupportsAlpha()
{
$this->assertInternalType('boolean', $this->getPalette()->supportsAlpha());
}
abstract public function provideColorAndAlphaTuples();
abstract public function provideColorsForBlending();
/**
* @return PaletteInterface
*/
abstract protected function getPalette();
}

@ -1,68 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Test\Image\Palette;
use Imagine\Image\Palette\CMYK;
use Imagine\Image\Palette\Color\CMYK as CMYKColor;
class CMYKTest extends AbstractPaletteTest
{
public function provideColorAndAlphaTuples()
{
$palette = $this->getPalette();
return array(
array(new CMYKColor($palette, array(1, 2, 3, 4)), array(1, 2, 3, 4), null),
array(new CMYKColor($palette, array(4, 3, 2, 1)), array(4, 3, 2, 1), null),
array(new CMYKColor($palette, array(0, 33, 67, 99)), array(3, 2, 1), null),
array(new CMYKColor($palette, array(0, 0, 0, 0)), array(255, 255, 255), null),
array(new CMYKColor($palette, array(0, 0, 0, 100)), array(0, 0, 0), null),
);
}
public function provideColorAndAlpha()
{
return array(
array(array(4, 3, 2, 1), null)
);
}
public function testColorWithDifferentAlphasAreNotSame($color = null)
{
$this->markTestSkipped('CMYK does not support alpha');
}
public function provideColorsForBlending()
{
$palette = $this->getPalette();
return array(
array(
new CMYKColor($palette, array(56, 29, 38, 48)),
new CMYKColor($palette, array(1, 2, 3, 4)),
new CMYKColor($palette, array(50, 25, 32, 40)),
1.1,
),
array(
new CMYKColor($palette, array(21, 12, 15, 20)),
new CMYKColor($palette, array(1, 2, 3, 4)),
new CMYKColor($palette, array(50, 25, 32, 40)),
0.4,
),
);
}
protected function getPalette()
{
return new CMYK();
}
}

@ -1,129 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Test\Image\Palette\Color;
use Imagine\Test\ImagineTestCase;
abstract class AbstractColorTest extends ImagineTestCase
{
/**
* @dataProvider provideColorAndAlphaTuples
*/
public function testGetAlpha($expected, $color)
{
$this->assertEquals($expected, $color->getAlpha());
}
public function testGetPalette()
{
$this->assertInstanceOf('Imagine\Image\Palette\PaletteInterface', $this->getColor()->getPalette());
}
/**
* @dataProvider provideColorAndValueComponents
*/
public function testGetvalue($expected, $color)
{
$data = array();
foreach ($color->getPalette()->pixelDefinition() as $component) {
$data[$component] = $color->getValue($component);
}
$this->assertEquals($expected, $data);
}
public function testDissolve()
{
$color = $this->getColor();
$alpha = $color->getAlpha();
$signature = (string) $color;
$color = $color->dissolve(2);
$this->assertEquals(2 + $alpha, $color->getAlpha());
$this->assertEquals($signature, (string) $color);
}
public function testLighten()
{
$color = $this->getColor();
$data = array();
foreach ($color->getPalette()->pixelDefinition() as $component) {
$data[$component] = $color->getValue($component);
}
$color->lighten(4);
foreach ($color->getPalette()->pixelDefinition() as $component) {
$this->assertLessThanOrEqual($data[$component], $color->getValue($component));
}
}
public function testDarken()
{
$color = $this->getColor();
$data = array();
foreach ($color->getPalette()->pixelDefinition() as $component) {
$data[$component] = $color->getValue($component);
}
$color->darken(4);
foreach ($color->getPalette()->pixelDefinition() as $component) {
$this->assertGreaterThanOrEqual($data[$component], $color->getValue($component));
}
}
/**
* @dataProvider provideGrayscaleData
*/
public function testGrayscale($expected, $color)
{
$this->assertEquals($expected, (string) $color->grayscale());
}
/**
* @dataProvider provideOpaqueColors
*/
public function testIsOpaque($color)
{
$this->assertTrue($color->isOpaque());
}
/**
* @dataProvider provideNotOpaqueColors
*/
public function testIsNotOpaque($color)
{
$this->assertFalse($color->isOpaque());
}
abstract public function provideColorAndValueComponents();
abstract public function provideOpaqueColors();
abstract public function provideNotOpaqueColors();
abstract public function provideGrayscaleData();
abstract public function provideColorAndAlphaTuples();
/**
* @return ColorInterface
*/
abstract protected function getColor();
}

@ -1,75 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Test\Image\Palette\Color;
use Imagine\Image\Palette\Color\CMYK;
use Imagine\Image\Palette\Color\ColorInterface;
use Imagine\Image\Palette\CMYK as CMYKPalette;
class CMYKTest extends AbstractColorTest
{
/**
* @expectedException Imagine\Exception\RuntimeException
*/
public function testDissolve()
{
$this->getColor()->dissolve(1);
}
public function provideOpaqueColors()
{
return array(
array($this->getColor()),
);
}
public function testIsNotOpaque($color = null)
{
$this->markTestSkipped('CMYK color can not be not opaque');
}
public function provideNotOpaqueColors()
{
$this->markTestSkipped('CMYK color can not be not opaque');
}
public function provideGrayscaleData()
{
return array(
array('cmyk(42%, 42%, 42%, 25%)', $this->getColor()),
);
}
public function provideColorAndAlphaTuples()
{
return array(
array(null, $this->getColor())
);
}
protected function getColor()
{
return new CMYK(new CMYKPalette(), array(12, 23, 45, 25));
}
public function provideColorAndValueComponents()
{
return array(
array(array(
ColorInterface::COLOR_CYAN => 12,
ColorInterface::COLOR_MAGENTA => 23,
ColorInterface::COLOR_YELLOW => 45,
ColorInterface::COLOR_KEYLINE => 25,
), $this->getColor()),
);
}
}

@ -1,65 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Test\Image\Palette\Color;
use Imagine\Image\Palette\Color\Gray;
use Imagine\Image\Palette\Color\ColorInterface;
use Imagine\Image\Palette\Grayscale;
class GrayTest extends AbstractColorTest
{
public function provideOpaqueColors()
{
return array(
array(new Gray(new Grayscale(), array(12), 0)),
array(new Gray(new Grayscale(), array(0), 0)),
array(new Gray(new Grayscale(), array(255), 0)),
);
}
public function provideNotOpaqueColors()
{
return array(
array($this->getColor()),
array(new Gray(new Grayscale(), array(12), 23)),
array(new Gray(new Grayscale(), array(0), 45)),
array(new Gray(new Grayscale(), array(255), 100)),
);
}
public function provideGrayscaleData()
{
return array(
array('#0c0c0c', $this->getColor()),
);
}
public function provideColorAndAlphaTuples()
{
return array(
array(14, $this->getColor())
);
}
protected function getColor()
{
return new Gray(new Grayscale(), array(12), 14);
}
public function provideColorAndValueComponents()
{
return array(
array(array(
ColorInterface::COLOR_GRAY => 12,
), $this->getColor()),
);
}
}

@ -1,67 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Test\Image\Palette\Color;
use Imagine\Image\Palette\Color\RGB;
use Imagine\Image\Palette\Color\ColorInterface;
use Imagine\Image\Palette\RGB as RGBPalette;
class RGBTest extends AbstractColorTest
{
public function provideOpaqueColors()
{
return array(
array(new RGB(new RGBPalette(), array(12, 123, 245), 0)),
array(new RGB(new RGBPalette(), array(0, 0, 0), 0)),
array(new RGB(new RGBPalette(), array(255, 255, 255), 0)),
);
}
public function provideNotOpaqueColors()
{
return array(
array($this->getColor()),
array(new RGB(new RGBPalette(), array(12, 123, 245), 23)),
array(new RGB(new RGBPalette(), array(0, 0, 0), 45)),
array(new RGB(new RGBPalette(), array(255, 255, 255), 100)),
);
}
public function provideGrayscaleData()
{
return array(
array('#686868', $this->getColor()),
);
}
public function provideColorAndAlphaTuples()
{
return array(
array(14, $this->getColor())
);
}
protected function getColor()
{
return new RGB(new RGBPalette(), array(12, 123, 245), 14);
}
public function provideColorAndValueComponents()
{
return array(
array(array(
ColorInterface::COLOR_RED => 12,
ColorInterface::COLOR_GREEN => 123,
ColorInterface::COLOR_BLUE => 245,
), $this->getColor()),
);
}
}

@ -1,155 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Test\Image\Palette;
use Imagine\Image\Palette\ColorParser;
use Imagine\Test\ImagineTestCase;
class ColorParserTest extends ImagineTestCase
{
/**
* @dataProvider provideRGBdataToParse
*/
public function testParseToRGB($expected, $value)
{
$parser = new ColorParser();
$this->assertEquals($expected, $parser->parseToRGB($value));
}
/**
* @dataProvider provideRGBdataThatFail
* @expectedException Imagine\Exception\InvalidArgumentException
*/
public function testParseToRGBThatFails($value)
{
$parser = new ColorParser();
$parser->parseToRGB($value);
}
/**
* @dataProvider provideCMYKdataToParse
*/
public function testParseToCMYK($expected, $value)
{
$parser = new ColorParser();
$this->assertEquals($expected, $parser->parseToCMYK($value));
}
/**
* @dataProvider provideCMYKdataThatFail
* @expectedException Imagine\Exception\InvalidArgumentException
*/
public function testParseToCMYKThatFails($value)
{
$parser = new ColorParser();
$parser->parseToCMYK($value);
}
public function provideRGBdataToParse()
{
return array(
array(array(255, 255, 0), 'ff0'),
array(array(255, 255, 0), '#ff0'),
array(array(205, 162, 52), 'CDA234'),
array(array(205, 162, 52), '#CDA234'),
array(array(205, 162, 52), 13476404),
array(array(124, 32, 125), array(124, 32, 125)),
);
}
public function provideCMYKdataToParse()
{
return array(
array(array(0, 0, 0, 0), 'FFFFFF'),
array(array(0, 0, 0, 100), '000000'),
array(array(0, 21, 75, 20), 'CDA234'),
array(array(0, 21, 75, 20), '#CDA234'),
array(array(0, 21, 75, 20), 'cmyk(0, 21, 75, 20)'),
array(array(0, 21, 75, 20), 'cmyk(0,21,75,20)'),
array(array(0, 21, 75, 20), 'cmyk(0%, 21%, 75%, 20%)'),
array(array(0, 21, 75, 20), 'cmyk(0%,21%,75%,20%)'),
array(array(0, 21, 75, 20), 13476404),
array(array(100, 0, 100, 0), '#00FF00'),
array(array(24, 32, 75, 12), array(24, 32, 75, 12)),
);
}
public function provideRGBdataThatFail()
{
return array(
array(array(0, 1)),
array(array(0, 1, 0, 1, 0)),
array('1234'),
array('#1234'),
array(imagecreatetruecolor(10, 10)),
);
}
public function provideCMYKdataThatFail()
{
return array(
array(array(0, 1)),
array(array(0, 1, 0, 1, 0)),
array('1234'),
array('#1234'),
array(imagecreatetruecolor(10, 10)),
);
}
/**
* @dataProvider provideGrayscaledataToParse
*/
public function testParseToGrayscale($expected, $value)
{
$parser = new ColorParser();
$this->assertEquals($expected, $parser->parseToGrayscale($value));
}
/**
* @dataProvider provideGrayscaledataThatFail
* @expectedException Imagine\Exception\InvalidArgumentException
*/
public function testParseToGrayscaleThatFails($value)
{
$parser = new ColorParser();
$parser->parseToGrayscale($value);
}
public function provideGrayscaledataToParse()
{
return array(
array(array(23), array(23, 23, 23)),
array(array(0), array(0, 0, 0)),
array(array(255), array(255, 255, 255)),
array(array(23), array(23)),
array(array(0), array(0)),
array(array(255), array(255)),
array(array(136), '#888888'),
array(array(153), '999999'),
array(array(0), '#000000'),
array(array(255), 'FFFFFF'),
);
}
public function provideGrayscaledataThatFail()
{
return array(
array(array(23, 23, 24)),
array(array(0, 0, 1)),
array('#656666'),
array('777677'),
);
}
}

@ -1,64 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Test\Image\Palette;
use Imagine\Image\Palette\Grayscale;
use Imagine\Image\Palette\Color\Gray;
class GrayscaleTest extends AbstractPaletteTest
{
public function provideColorAndAlphaTuples()
{
$palette = $this->getPalette();
return array(
array(new Gray($palette, array(23), 0), array(23, 23, 23), null),
array(new Gray($palette, array(24), 3), array(24, 24, 24), 3),
array(new Gray($palette, array(23), 0), array(23), null),
array(new Gray($palette, array(24), 3), array(24), 3),
array(new Gray($palette, array(255), 0), array(255), null),
array(new Gray($palette, array(0), 0), array(0), null),
);
}
public function provideColorAndAlpha()
{
return array(
array(array(23, 23, 23), 0.5),
);
}
public function provideColorsForBlending()
{
$palette = $this->getPalette();
return array(
array(
new Gray($palette, array(55), 0),
new Gray($palette, array(1), 0),
new Gray($palette, array(50), 0),
1.1,
),
array(
new Gray($palette, array(21), 0),
new Gray($palette, array(1), 0),
new Gray($palette, array(50), 0),
0.4,
),
);
}
protected function getPalette()
{
return new Grayscale();
}
}

@ -1,64 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Test\Image\Palette;
use Imagine\Image\Palette\RGB;
use Imagine\Image\Palette\Color\RGB as RGBColor;
class RGBTest extends AbstractPaletteTest
{
public function provideColorAndAlphaTuples()
{
$palette = $this->getPalette();
return array(
array(new RGBColor($palette, array(23, 24, 0), 0), array(23, 24, 0), null),
array(new RGBColor($palette, array(23, 24, 0), 0), array(23, 24, 0), 0),
array(new RGBColor($palette, array(23, 24, 0), 3), array(23, 24, 0), 3),
array(new RGBColor($palette, array(129, 127, 168), 3), array(23, 24, 0, 34), 3),
array(new RGBColor($palette, array(255, 255, 255), 0), array(0, 0, 0, 0), null),
array(new RGBColor($palette, array(0, 0, 0), 0), array(0, 0, 0, 100), null),
);
}
public function provideColorAndAlpha()
{
return array(
array(array(23, 24, 0), 0.5),
);
}
public function provideColorsForBlending()
{
$palette = $this->getPalette();
return array(
array(
new RGBColor($palette, array(240, 0, 0), 0),
new RGBColor($palette, array(230, 0, 0), 0),
new RGBColor($palette, array(128, 0, 0), 0),
1.1,
),
array(
new RGBColor($palette, array(21, 11, 15), 0),
new RGBColor($palette, array(1, 2, 3), 0),
new RGBColor($palette, array(50, 25, 32), 0),
0.4,
),
);
}
protected function getPalette()
{
return new RGB();
}
}

@ -1,48 +0,0 @@
<?php
/*
* This file is part of the Imagine package.
*
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagine\Test\Image;
use Imagine\Image\Profile;
use Imagine\Test\ImagineTestCase;
class ProfileTest extends ImagineTestCase
{
public function testName()
{
$profile = new Profile('romain', 'neutron');
$this->assertEquals('romain', $profile->name());
}
public function testData()
{
$profile = new Profile('romain', 'neutron');
$this->assertEquals('neutron', $profile->data());
}
public function testFromPath()
{
$file = __DIR__ . '/../../../../lib/Imagine/resources/Adobe/CMYK/JapanColor2001Uncoated.icc';
$profile = Profile::fromPath($file);
$this->assertEquals(basename($file), $profile->name());
$this->assertEquals(file_get_contents($file), $profile->data());
}
/**
* @expectedException Imagine\Exception\InvalidArgumentException
*/
public function testFromInvalidPath()
{
$file = __DIR__ . '/non-existent-profile.icc';
Profile::fromPath($file);
}
}
Loading…
Cancel
Save