Receiving Images from Android to C

Hi,

My goal is to receive images from Android to C using TCP/IP protocol. when i implemented, i am able to receive only the image icon but when i open the file i am getting an error.

Could somebody solve this for me.