title: How To Use ImageTool Component for CakePHP
body: <p>I'm working on a CakePHP project where I need to apply some image transformations. I chose to try this one: <a href="https://github.com/raitisg/CakePHP-ImageTool-Component" rel="nofollow">https://github.com/raitisg/CakePHP-ImageTool-Component</a>. However, I can't seem to figure out how to use it even by the examples given on the github-page like this one:</p>
  
  <pre><code>$status = ImageTool::resize(array(
      'input' =&gt; $input_file,
      'output' =&gt; $output_file,
      'width' =&gt; 600,
      'height' =&gt; 600,
      'keepRatio' =&gt; true,
      'paddings' =&gt; false,
      'afterCallbacks' =&gt; array(
          array('watermark', array('watermark' =&gt; $watermark_file, 'position' =&gt; 'bottom-right')),
          array('unsharpMask'),
      )
  ));
  </code></pre>
  
  <p>I want to use ImageTool in a Controller where I run through a directory with images that shall get transformed and copied to another directory (and their paths into a database). I know the above example is a static call, but what does $status mean here? Where am I supposed to set $input_file, $output_file and $watermark_file?</p>
  
  <p>I found ImageTool referenced on the CakePHP site, but couldn't find any real life examples. </p>