How to save an image correctly so that it does not lose its transparent background