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

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

Attachments

containerResponsive.PNG

containerResponsive.PNG (114.38 KiB) Viewed 750 times

whiteContainer.PNG

whiteContainer.PNG (301.11 KiB) Viewed 750 times


New member

Posts

Joined
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.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);

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Stef97 » Tue Sep 25, 2018 2:10 pm

Hey,

thank you. It works.

Greetings,
Stef

New member

Posts

Joined
Thu Sep 13, 2018 2:24 pm
Who is online

Users browsing this forum: No registered users and 65 guests