Hey guys,
New here so please dont shoot. Love working with opencart so far, just like smarty!
Two questions though.
1. How do i change the default background colour of images uploaded (so the fill that is used to create the correct aspect ratio... for example if my image box size is set to 200x200 and i upload an image 150x200... 50px of white background will be filled in the image)
2. How do i change the border color of these images?
Currently by default. BG Fill is White, and Border is Black.
I have searched everywhere for #FFFFFF which may give me a hint on where to change... but i dont see anything :S
Appreciate any help!
- Claude
Hi,
Cant help that much as I have lost the default theme - overwrote it by mistake. However...
1) There is no single css or html command to really do this, but it would be handy.
You could do it this way;
First you would have to set up a container div that you can size exactly and align the content to the middle or center. Then you can put the image generating line of code into that container. You can then set the background of the container to any colour or graphic you like.
2) Find the element that has the borders, and then find the css element for it. There will be a color statement in there somewhere but it might be White, #fff or an RGB statement (which I dont use). Some of the styling has been left hardcoded but only occassionally. If you have a page example link you can send I can have a better look for you.
Neither of these are particularly helpful as I no longer have the default template, but I know how frustrating it can be sometimes when you cant find the source of the code.
Hope this helps in some way,
Paul.
Cant help that much as I have lost the default theme - overwrote it by mistake. However...
1) There is no single css or html command to really do this, but it would be handy.
You could do it this way;
First you would have to set up a container div that you can size exactly and align the content to the middle or center. Then you can put the image generating line of code into that container. You can then set the background of the container to any colour or graphic you like.
2) Find the element that has the borders, and then find the css element for it. There will be a color statement in there somewhere but it might be White, #fff or an RGB statement (which I dont use). Some of the styling has been left hardcoded but only occassionally. If you have a page example link you can send I can have a better look for you.
Neither of these are particularly helpful as I no longer have the default template, but I know how frustrating it can be sometimes when you cant find the source of the code.
Hope this helps in some way,
Paul.
Just a note - in 1.2.9 this function is found in system/library/image.php on line 75
The 255, 255, 255 is the white colour.
I need to be able to position the uploaded image at the top center of the newly created image, does anyone know how I can achieve this? I'm experimenting, and will post again if I find out how, but any shared knowlege is appreciated!
Code: Select all
$background = imagecolorallocate($this->image, 255, 255, 255);
I need to be able to position the uploaded image at the top center of the newly created image, does anyone know how I can achieve this? I'm experimenting, and will post again if I find out how, but any shared knowlege is appreciated!
Who is online
Users browsing this forum: No registered users and 5 guests