Page 1 of 1

Delete the white Container around the Pictures

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

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?

Regards,
Stef

Re: Delete the white Container around the Pictures

Posted: Mon Sep 17, 2018 3:43 am
by IP_CAM
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.3.0.2.0! But I can't help, if it does not! :D
Ernie
Fixes white excess for non-proportional image resize (Code v.3.0.2.0)

Code: Select all

// Line Number below ist about Line 168
	$image_old = $this->image;
//  REPLACE:
//	$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);

//  REPLACE:
//	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

	imagedestroy($image_old);

Re: Delete the white Container around the Pictures

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

thank you. It works.

Greetings,
Stef