Fixed PNG loading and JPEG saving.

Signed-off-by: Amber Thrall <amber.rose.thrall@gmail.com>