hie Team.
here is my scenario:
1. i managed to convert a bmp image file to hex and then sending it to a server.
see the following code
2. now the server is returning back those hex values and i want to convert them back to the original bmp image file.
Thanks in advance
here is my scenario:
1. i managed to convert a bmp image file to hex and then sending it to a server.
see the following code
Code:
fp = fopen("\\C\\photo.bmp","rb");
fseek(fp,0,SEEK_END); //go to end
PicLen = ftell(fp); //get position at end (length)
PICBuffer = (byte *)malloc(PicLen); //malloc buffer
fseek(fp,0,SEEK_SET); //go to beg.
fread(PICBuffer,PicLen,1,fp); //read into buffer
fclose(fp);
i=0;
do
{
sprintf(temp,"%02x",PICBuffer[i]);
strcat(ReqInfo.Pic,temp);
i+=1;
}
while(i<PicLen);
Thanks in advance
Comment