private function process($width, $height)
 {
     if ($width == $this->input->getWidth() && $height == $this->input->getHeight()) {
         if (!is_null($this->out)) {
             try {
                 unlink($this->out);
             } catch (ExecutionContextException $e) {
             }
             copy($this->input->getFilename(), $this->out);
         }
         return file_get_contents($this->input->getFilename());
     }
     ob_start();
     // Creating destination img
     $dest = imagecreatetruecolor($width, $height);
     if ($this->enableInterlacing) {
         imageinterlace($dest, 1);
     }
     // Opening source img
     $imagefunc = $this->ImageTypeToFunctionName("imagecreatefrom");
     $src = $imagefunc($this->input->getFilename());
     $func = $this->useResample && function_exists('imagecopyresampled') ? 'imagecopyresampled' : 'imagecopyresized';
     $func($dest, $src, 0, 0, 0, 0, $width, $height, $this->input->getWidth(), $this->input->getHeight());
     imagedestroy($src);
     // Output
     $func = $this->imageTypeToFunctionName("image");
     $args = array();
     $args[] =& $dest;
     if ($this->out) {
         $args[] = $this->out;
     }
     if (IMAGETYPE_JPEG == $this->input->getType()) {
         if (!$this->out) {
             $args[] = null;
         }
         $args[] = 100;
     }
     call_user_func_array($func, $args);
     imagedestroy($dest);
     return ob_get_clean();
 }