0

I have installed patch SUPEE-9767 on 1.9.2.1 store, Now the new products images is having a black color around it. I attached a sample product image.

I have tried this fix

Watermark get black background when transparent

but the problem is after I update the new code in Validator/Image.php I cannot upload images from the admin, I can use the browse button and click Upload but after that it's just showing 'uploading' forever

Would some one advice me how to fix this issue

product image

sv3n
11.7k7 gold badges44 silver badges75 bronze badges
asked Jun 16, 2017 at 17:46

1 Answer 1

0

I have encountered this bug as well. I have applied a fix to the Mage_Core_Model_File_Validator_Image class and was looking for a place to submit a bug report and patch for this.

In between lines 96 and 97, I have added this small check for PNG and GIF type images to preserve the alpha channel of the image:

if ($fileType == IMAGETYPE_GIF || $fileType == IMAGETYPE_PNG) {
 imagecolortransparent($img, imagecolorallocatealpha($img, 0, 0, 0, 127));
 imagealphablending($img, false);
 imagesavealpha($img, true);
}

I have tested this and can confirm it works when adding images to a product from the catalogue view. If you implement this, please let me know if it works for you as well.

answered Jun 26, 2017 at 20:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.