Post by mr.sticky » Fri Aug 19, 2011 2:43 am

Hi, I have installed template Black Shadow on my Version 1-4-9-4. It seems to work well on this version, with the exception that all the images, be it thumbnail through to enlarged image all have thick white lines down either side, or top and bottom. I understand that all my images have been uploded as rectangles and they are processed onto a square white template, but can anybody throw some light on:- a, where this process is in the program, b, if I can change the original template 'square' from white to transparent so that the white stripes disappear, or c, possibly change the shape of the square to that of the image that sits on(in) it ? It is not practical to change the images from rectangle to square and reload them, so a change in the program is my only option.

Newbie

Posts

Joined
Fri Mar 11, 2011 6:35 am

Post by fido-x » Fri Aug 19, 2011 11:45 am

mr.sticky wrote:... but can anybody throw some light on:-
a, where this process is in the program,
b, if I can change the original template 'square' from white to transparent so that the white stripes disappear, or
c, possibly change the shape of the square to that of the image that sits on(in) it ? It is not practical to change the images from rectangle to square and reload them, so a change in the program is my only option.
Answers:
a) "system/library/image.php" at line 82, you'll find:

Code: Select all

$background = imagecolorallocate($this->image, 255, 255, 255); 
This sets the background colour for the resized image.

b) If you use .png images with a transparent background, the transparency will be retained. This won't work for .jpg images, as jpeg can't handle transparencies.

c) Change the size in your settings. Log in to your admin, go to "System->Settings" and "Edit" the relevant store. Under the "Image" tab, you can set the sizes of the various images used.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia
Who is online

Users browsing this forum: No registered users and 4 guests