Author Topic: How to change background color of resized product images  (Read 5452 times)

Offline dharding

  • Newbie
  • *
  • Posts: 41
  • Karma: +7/-0
    • View Profile
How to change background color of resized product images
« 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.

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: How to change background color of resized product images
« Reply #1 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
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline dharding

  • Newbie
  • *
  • Posts: 41
  • Karma: +7/-0
    • View Profile
Re: How to change background color of resized product images
« Reply #2 on: January 05, 2018, 12:07:04 PM »
Excellent, thank you!

Offline itstrisha

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: How to change background color of resized product images
« Reply #3 on: April 25, 2018, 07:24:52 AM »
ope your file and re fill the image size

 

Powered by SMFPacks Social Login Mod