Update libpng API usage

 Remove usage of deprecated methods

Change-Id: I747568a2c8c0c65ecbc9a3da4bac7b9cac7708ab