on the product detailed page ,the showing product image would auto-add white space/side ,
how to make the white space/side to be black in order to be consistent with the website black background color?
thanks
my extension:https://www.opencart.com/index.php?rout ... estshop24h
email :support@bestshop24h.com
site:http://www.bestshop24h.com
https://www.waxedperfection.co.uk/ Car Detailing Product Blog's and Review's
This question has been asked and answered many times, please search before posting.
Locking topic.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
the same as the background color
but if using jpg image,it is not ok,the auto-add space's color is different from the background color ,it is white color,how to change the auto-add white space to be black?
Attachments
联想截图_20240909121021.png (1.08 MiB) Viewed 1364 times
Look for the following code under the "resize" function, and change the "255, 255, 255":
Code: Select all
$background = imagecolorallocate($this->image, 255, 255, 255);
Code: Select all
$background = imagecolorallocate($this->image, 0, 0, 0);
Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager Pro • Drag & Drop Sort Order
Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.
i have go to system/library/image.php ,and change
Code: Select all
$background = imagecolorallocate($this->image, 255, 255, 255);
Code: Select all
$background = imagecolorallocate($this->image, 0, 0, 0);
Deleted your old cached images?tingwing wrote: ↑Mon Sep 09, 2024 12:44 pmthanks for reply, what you said is the sam as what chatGPT4,i also feel it is the right solution ,but no good luck,still show white space.
i have go to system/library/image.php ,and changetoCode: Select all
$background = imagecolorallocate($this->image, 255, 255, 255);
and refresh the theme and SASS ,and refresh the modification and clear browser cache ...Code: Select all
$background = imagecolorallocate($this->image, 0, 0, 0);
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Just wanted to chime in and clarify that my solution did not come from ChatGPT. I prefer Claude nowadays anyway.tingwing wrote: ↑Mon Sep 09, 2024 12:44 pmthanks for reply, what you said is the sam as what chatGPT4,i also feel it is the right solution ,but no good luck,still show white space.
i have go to system/library/image.php ,and changetoCode: Select all
$background = imagecolorallocate($this->image, 255, 255, 255);
and refresh the theme and SASS ,and refresh the modification and clear browser cache ...Code: Select all
$background = imagecolorallocate($this->image, 0, 0, 0);
Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager Pro • Drag & Drop Sort Order
Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.
Users browsing this forum: No registered users and 33 guests