I was running into this issue with the new Magento Configurable swatches feature in 1.9:
Some of my product images are .png with a transparent background, and the color swatch images seem to default to a black background.
Swatch (auto-generated):
Product image:
Best Answer
I solved this problem by calling
Varien_Image::keepTransparency(true)
on the before it does the resize.Unfortunately, there's no event we can observe here, so we have to extend/override
Mage_ConfigurableSwatches_Helper_Productimg::_resizeSwatchImage
.Maybe someone else (you?) can propose a more future-proof solution.
etc/config.xml:
Helper/Productimg.php: