#include #include #include #include #include "config.h" void print_mx5000image(const unsigned char *image, int len, int width, int height) { char buf[width][height]; int x=0, y=0, i=0; for (i=0;i>(7-(i%8)))&1; y++; if (y%8 == 0) { x++; if (x >= width) { x = 0; } else { y -= 8; } } } for (y=0; y= *width) { x = 0; } else { y -= 8; } } } exit2: pbm_freearray(image, readheight); exit1: fclose(file); printf("w: %d h: %d\n", *width, *height); return mx5000image; }