#include #include int main(int argc, char *argv[]) { FILE *f = fopen("graf.mif", "rb"); fseek(f, 0, SEEK_END); int size = ftell(f); fseek(f, 0, SEEK_SET); unsigned char *buffer = (unsigned char*)malloc(size); fread(buffer, size, 1, f); fclose(f); unsigned char *p = buffer; int num_img = *p++; p += num_img*8; for (int i=0; i