+/* Scan Pixels
+ Scans up to 'len' pixels from the current file into 'buf'.
+ Returns the number of pixels scanned from the file, or -1 on error
+*/
+int scanner_scanpixels
+( int* buf,
+ int max_len
+)
+{ static int col_len, row_len, row;
+ //Open the current file if not yet open
+ if (current_open_file == NULL)
+ { if ((current_open_file = fopen(DL_CD_CURNAME(),"rb")) == NULL)
+ { perror("fopen: ");
+ return -1;
+ }
+ //Verify file header, get row_len/col_len
+ if (read_img_header(&row_len, &col_len))
+ return -1;
+ row = 0;
+ }
+ //Read pixels into the buffer if there are rows left in the image
+ if (row++ < row_len)
+ //TODO: return read_img_pixels(buf, col_len);
+ printf("SCANPIXELS NOT IMPLEMENTED\n.");
+ //Close the file and return 0
+ fclose(current_open_file);
+ current_open_file = NULL;
+ return 0;
+}
+