keep transparency when resizing or cropping png/gif

fixes black background for thumbnails of pngs with transparent pixels