title: Yii:Why images are not resized correctly ?
body: <p>I am using image extension for image re sizing but they are not resized according to the parameters which i gave. Here is my code.Is there any mistake in my code or what. Images which are resized have dimension equal to "800*533"
   but not exactly equals to 800*600.</p>
  
  <pre><code>public function actionCreate()
      {
          $model=new Business;
  
              // Uncomment the following line if AJAX validation is needed
              // $this-&gt;performAjaxValidation($model);
  
              if(isset($_POST['Business']))
              {
                           $rnd = rand(0, 9999);  // generate random number between 0-9999
  
                  $model-&gt;attributes = $_POST['Business'];
  
                  $uploadedFile = CUploadedFile::getInstance($model, 'image');
                  $fileName = "{$rnd}-{$uploadedFile}";  // random number + file name
                  $model-&gt;image = $fileName;
  
  
                  if ($model-&gt;save()) {
                       if(!empty($uploadedFile))  // check if uploaded file is set or not
                  {
                      //$uploadedFile-&gt;saveAs(Yii::getPathOfAlias('webroot')."/img".$filename);
                      $uploadedFile-&gt;saveAs(Yii::app()-&gt;basePath . '/../img/' . $fileName);
                      $image = Yii::app()-&gt;image-&gt;load(Yii::app()-&gt;basePath . '/../img/' . $fileName);
                     $image-&gt;resize(800, 600);
                      $image-&gt;save(Yii::app()-&gt;basePath . '/../img/' . $fileName);
                      }
  
                      $this-&gt;redirect(array('view', 'id' =&gt; $model-&gt;id));
                  }
              }
  
              $this-&gt;render('create', array(
                  'model' =&gt; $model,
              ));
          }
  </code></pre>