I am using this code to resize images. The resize works just fine, except the image background changes from transparent to black. I would like to maintain the transparent background but haven't found a resource explaining how to do it.
https://jsfiddle.net/skwny/gh7c2mpa/
see fiddle