AbanteCart Community

eCommerce construction => How-to questions => Topic started by: dharding on January 04, 2018, 11:35:51 PM

Title: How to change background color of resized product images
Post by: dharding on January 04, 2018, 11:35:51 PM
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.
Title: Re: How to change background color of resized product images
Post by: abolabo on January 05, 2018, 05:22:46 AM
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
Title: Re: How to change background color of resized product images
Post by: dharding on January 05, 2018, 12:07:04 PM
Excellent, thank you!
Title: Re: How to change background color of resized product images
Post by: itstrisha on April 25, 2018, 07:24:52 AM
ope your file and re fill the image size