Update img.php

preserver transparency on PNG files,
image resample instead on resize