so far ive got

int width;
int height;
int bitdepth;
stringstream ss;
string str;
typedef unsigned char byte
int _tmain(int argc, _TCHAR* argv[])
{
str = argv[1];
stringstream(st r) >> width;
str = argv[2];
stringstream(st r) >> height;
str = argv[3];
stringstream(st r) >> bitdepth;

ifstream inFile(argv[4],...