/** * Apply the transformation to the image and returns the resized image */ protected function transform(sfImage $image) { list($target_w, $target_h) = $this->computeTargetSize($image->getWidth(), $image->getHeight()); return $image->resizeSimple($target_w, $target_h); }