png decoder and cropping