Updated to use png device rather than using the dev.copy