I'm using the resize function in OpenCart , but it's resizing the image whit white spaces in it's top and bottom. I'm not sure, but it looks like, that the resize function is watching only the width, and then mesuring the height.
if (!empty($product_info) && $product_info['image'] && file_exists(DIR_IMAGE . $product_info['image'])) {
$this->data['thumb'] = $this->model_tool_image->resize($product_info['image'], 100, 100);
} else {
$this->data['thumb'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
}
This is the code i'm using, nothing much . The width of the image is how I'm setting it, in my case 100px. The width is being setted 100px - to, but it's showing like 20px on top and 20px on bottom , white space.