BrainSuperGlue Posted August 6, 2017 Share Posted August 6, 2017 Hi,I need a sanity check on something for Prestashop 1.6Currently the fill colour of a product is white and I need it to be black.Doing research I went into /classes/ImageManager.php and changed the 255,255,255 at the end of the $white line to 0,0,0 { $white = imagecolorallocate($dest_image, 0, 0, 0); imagefilledrectangle ($dest_image, 0, 0, $dst_width, $dst_height, $white); } I also went into /webservice/WebserviceSpecificManagementImages.php and changed the 255,255,255 on the $white line to 0,0,0 if ( !($destImage = imagecreatetruecolor($destWidth, $destHeight)) || !($white = imagecolorallocate($destImage, 0, 0, 0)) || Cleared the cache on both the store site and the browser but the fill was still whiteChanged the Images from JPG to all PNG but still whiteRetriggered the thumbnails to be rebuilt, still white.Have I missed something obvious?Thanks BSG Link to comment Share on other sites More sharing options...
Scully Posted August 7, 2017 Share Posted August 7, 2017 (edited) According to the PS 1.6.1.13 code, the PNG images are filled with transparent background. If you try with PNG, you could change ImageManager from this line $transparent = imagecolorallocatealpha($dest_image, 255, 255, 255, 127); to $transparent = imagecolorallocatealpha($dest_image, 0, 0, 0, 0); Also note that the definition of $white or $transparent is done at several places in ImageManager.php. If counted 4 places. Have you changed them all or only at one place? Edited August 7, 2017 by Scully (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now