Supprimer l'image, redimensionner ratio de OpenCart

J'ai regarder partout sur comment je pourrais supprimer le redimensionnement d'image dans OpenCart mais je n'ai pas trouve rien à ce sujet.

J'ai besoin qu'il redimensionner mais ne gardez pas le rapport. Je veux l'image pour être juste comme je l'ai mis.

Voici le code de redimensionnement dans le system/library/image.php

public function resize($width = 0, $height = 0) {
if (!$this->info['width'] || !$this->info['height']) {
return;
}
$xpos = 0;
$ypos = 0;
$scale = min($width / $this->info['width'], $height / $this->info['height']);
if ($scale == 1) {
return;
}
$new_width = (int)($this->info['width'] * $scale);
$new_height = (int)($this->info['height'] * $scale);            
$xpos = (int)(($width - $new_width) / 2);
$ypos = (int)(($height - $new_height) / 2);
$image_old = $this->image;
$this->image = imagecreatetruecolor($width, $height);
if (isset($this->info['mime']) && $this->info['mime'] == 'image/png') {     
imagealphablending($this->image, false);
imagesavealpha($this->image, true);
$background = imagecolorallocatealpha($this->image, 255, 255, 255, 127);
imagecolortransparent($this->image, $background);
} else {
$background = imagecolorallocate($this->image, 255, 255, 255);
}
imagefilledrectangle($this->image, 0, 0, $width, $height, $background);
imagecopyresampled($this->image, $image_old, $xpos, $ypos, 0, 0, $new_width, $new_height, $this->info['width'], $this->info['height']);
imagedestroy($image_old);
$this->info['width']  = $width;
$this->info['height'] = $height;
}

Ce que dans ce code je pourrais le supprimer afin que l'image ne le gardez pas de rapport sur les redimensionner ?

OriginalL'auteur Warface | 2011-08-16