Jump to content

[SOLVED] Resizing an image and adding black colour not white.


Recommended Posts

First of all I want to greet all of the users of PrestaShop :)

I have a question.

I'm adding new pictures for my items. But when I'm adding picture 400x500 pix it add a white border, so the picture is 500x500 with white border. Is there any way to change default colour from white to black? It would really help me a lot!

Picture how it looks on my shop: bialetlo.jpg

17697_gu0lv1rwFR9himQ0XidF_t

Link to comment
Share on other sites

  • 3 weeks later...

have a look in images.inc.php in the root folder of your prestashop install

$white = imagecolorallocate($destImage, 255, 255, 255);



try changing to

$white = imagecolorallocate($destImage, F, F, F);



for black background

I think this line appears twice in the file once, for enlarging image and once for cutting image, so you might have to make two alterations

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...