int width, height;
unsigned char * data;
FILE * file;
file = fopen(filename,"rb");
if (file == NULL) return 0;
width = 1024;
height = 512;
data = (unsigned char *)malloc(width * height * 3);
fread(data, width * height * 3, 1, file);
unsigned char * data;
FILE * file;
file = fopen(filename,"rb");
if (file == NULL) return 0;
width = 1024;
height = 512;
data = (unsigned char *)malloc(width * height * 3);
fread(data, width * height * 3, 1, file);
fclose(file);