Post by potzki » Thu Nov 22, 2012 7:16 am

Hi all,

I want to change the background color of my images in product page. I have many different images sizes and I have set the image size to 300x300 pixels but a lot of the images have an overflow of background behind them. I want to change the background to suit the new background color for my site which is #99CCFF. I have tried changing the css (a. image {background:#99CCFF;}) but that doesn't work. I have also tried to change the image.php file in system>library but when I change it to the dex code of #99CCFF I get an error and the page wont display. I have also tried to change it to the rgb code of 153,204,155 however in the origal php file there are 4 sets of digits instead of the 3 I thought there were in rgb code and changing to only the 3 sets of digits gives me another error.

Can anyone help with this please?

Thanks

Newbie

Posts

Joined
Tue Oct 23, 2012 8:11 am

Post by tora0515 » Fri Nov 23, 2012 8:06 am

What's your site?

Active Member

Posts

Joined
Fri Jun 15, 2012 3:05 pm

Post by pprmkr » Fri Nov 23, 2012 3:18 pm

Edit system/library/image.php

Find:

Code: Select all

$background = imagecolorallocatealpha($this->image, 255, 255, 255, 127);
Change into:

Code: Select all

$background = imagecolorallocatealpha($this->image, 153, 204, 255, 127);
Find:

Code: Select all

$background = imagecolorallocate($this->image, 255, 255, 255);
Change into:

Code: Select all

$background = imagecolorallocate($this->image, 153, 204, 255);
Delete all cached image files in image/cache

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands
Who is online

Users browsing this forum: No registered users and 14 guests