lightspeedretail / webstore

Web Store eCommerce solution for Lightspeed
http://www.lightspeedpos.com/webstore
Open Software License 3.0
85 stars 63 forks source link

Fixed issues with png transparency. #565

Closed mjvotaw closed 11 years ago

mjvotaw commented 11 years ago

We noticed that image transparency was being lost when uploading images from LightSpeed, despite the fact that IMAGE_BACKGROUND was null. It turns out that it was being lost in two ways: first, whenever Images::SaveImageData() would save the $blbImage to disk, and second whenever Image_GD_Driver attempted to create a transparent blank image with imagecreatetransparent().

SaveImageData() needs to run imagealphablending() and imagesavealpha() on the $blbImage before saving it.

Image_GD_Driver's original imagecreatetransparent() method did not create a transparent image at all, it was black. We replaced it with a different version.

ktwbc commented 11 years ago

We incorporated the lines into the core. This github repo is only for squashed commits between versions, it's not our working branch, that's why we didn't do the pull here.

mjvotaw commented 11 years ago

That's fine. In the future, would there be a more appropriate place for me to bring up issues like this?

ktwbc commented 11 years ago

Here is fine, actually, I generally just download a diff so I can pull it into our working branch, but it can still originate here.

Thank you for your contribution, too!