You could try it with this:
Creates a file and copies raw bytes from image to it
//////////////////////////////////////////////////
CFile myFile("image name.jpg", CFile::modeCreate | CFile::modeReadWrite);
CInternetSession session;
CStdioFile* file= session.OpenURL(URL /*CString to image URL*/, 1, INTERNET_FLAG_TRANSFER_BINARY)
UINT MaxImageSize= 1000000;
BYTE* buffer= new BYTE[MaxImageSize];
UINT size= file->Read(buffer, MaxImageSize);
if(size==0)
{
MessageBox("Cannot transfer image data to file"

;
}
myFile.Write(buffer, size);
delete [] buffer;
buffer= NULL;
///////////////////////////////////////////
Needs header <afxinet.h>
Worked at my programm (from Visual Studio.NET)
The biggest image possible im this example is 1000000 bytes big. Could also be bigger