Your data IS corrupt. The first 8 bytes of a valid PNG file are the decimal values 137 80 78 71 13 10 26 101
. Bytes 2 - 4 are the ASCII characters PNG
. Your file is something else or maybe just garbage.
BTW. Your question is poorly written as it lacks the relevant code. You'll get better results from improving your question than you will from adding a bounty.