remove all data parts from a png image except the required ones