support

How to change background color of resized product images

Started by dharding, January 04, 2018, 11:35:51 PM

Previous topic - Next topic

dharding

AbanteCart resizes all product images to make them perfectly square and pads either the sides (for a vertical image) or top and bottom (for a horizontal image) with white. My product images all have black backgrounds, so this does not look good.

How do I change it so that the image resizing uses black instead of white for the padding?

Thank you.

abolabo

just open your file

https://github.com/abantecart/abantecart-src/blob/master/public_html/core/lib/image.php#L255
lines 251 and 255

and replace "255" with "0".  Then clear image cache and open some page with pictures


itstrisha


Forum Rules Code of conduct
AbanteCart.com 2010 -