Post by Stef97 » Sun Sep 16, 2018 5:51 pm


i have seeing that around the 4 Pictures are big white Container which looks very bad and ugly.

Now i want that this white Containers get deleted or hiding. I have examined the Quellcode with the CSS-Scripts.
I have founded the CSS-Class swapper-container. If i changing the the height only the bottom of the white Container get changed.

Also if i tested the responsive the White Container is at a Viewport very big (75 % of this is white and the other 25% only the Picture).

Pictures of this Problem are attached.

Why it is so ?
How can i change it?




containerResponsive.PNG (114.38 KiB) Viewed 65 times


whiteContainer.PNG (301.11 KiB) Viewed 65 times



Thu Sep 13, 2018 2:24 pm

Post by IP_CAM » Mon Sep 17, 2018 3:43 am

That's a relavitely difficult matter to solve, but you could try this,
in the system/library/image.php File. Still, you may run into problems
this way by use of certain Image Dimensions, I recall to have experienced such,
but it's long, since I played around with this. It should work in all OC Versions,
as it looks, since the Mod was made years ago by famous MaxD for 1.5.6 Versions,
and it's still the same Code used in v.! But I can't help, if it does not! :D
Fixes white excess for non-proportional image resize (Code v.

Code: Select all

// Line Number below ist about Line 168
	$image_old = $this->image;
//	$this->image = imagecreatetruecolor($width, $height);
//  WITH:
	$this->image = imagecreatetruecolor($new_width, $new_height); 
//  END

	if ($this->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->width, $this->height);
//  WITH:
	imagecopyresampled($this->image, $image_old, 0, 0, 0, 0, $new_width, $new_height, $this->info['width'], $this->info['height']);
//  END


For Sale: Top URL's, including OpenCart V-Pro installed, like seen here: - -
For Information + URL's offered, please contact me at:
I am NOT available for Custom Support in existing OC Installations!
My Github Repositories:

User avatar
Guru Member


Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 6 guests