Preserve transparency when loading from a file

Fix #7148 - again :)

Immediately after commiting I've noticed: Is this needed for `IMAGETYPE_GIF` as well?

@karlitschek backport?

cc @georgehrke @blackm @MorrisJobke @PVince81