Page 1 of 1

Delete the white Container around the Pictures

Posted: Sun Sep 16, 2018 5:51 pm
by Stef97

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?


Re: Delete the white Container around the Pictures

Posted: 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


Re: Delete the white Container around the Pictures

Posted: Tue Sep 25, 2018 2:10 pm
by Stef97

thank you. It works.