title: How to resize an image in YII?
body: <p>When I try to load and resize an image:</p>
  
  <pre><code>$image = Yii::app()-&gt;image-&gt;load($path);
  $image-&gt;resize(400, 100);
  </code></pre>
  
  <p>I get this error</p>
  
  <pre><code>Property "CWebApplication.image" is not defined.
  </code></pre>
  
  <p>I've tried in the config file to put this:</p>
  
  <pre><code>'image'=&gt;array(
            'class'=&gt;'application.extensions.image.CImageComponent',
              // GD or ImageMagick
              'driver'=&gt;'GD',
              // ImageMagick setup path
              'params'=&gt;array('directory'=&gt;'/opt/local/bin'),
          ),
  </code></pre>
  
  <p>anyway I'am getting an error, how to resize an image in yii any ideas?, is there any native class to work with images?</p>