fptr = NULL;
}
+void printf_header_bytes(const char* data)
+{
+ const int header_spaces = 3;
+ const char space = 0x0a;
+ int space_count = 0;
+ int byte_count = 0;
+
+ while(space_count < header_spaces && byte_count < 50) {
+ printf("%02hhx ", data[byte_count]);
+ if (data[byte_count] == space) {
+ space_count++;
+ }
+
+ byte_count++;
+ }
+
+ printf("\nheader has %i bytes\n", byte_count);
+}
+
int main(int argc, char* argv[])
{
blobdata input;
kds_s2000w_convert_jpg_to_pnm_With_depth(&input, &output, 8);
kds_s2000w_convert_terminate();
+ printf_header_bytes((const char*) output.data);
write_file(&output);
free(input.data);