#include <stdio.h>
+#include <stdlib.h>
#include "../src/kds_s2000w_image_converter.h"
int main(int argc, char* argv[])
{
+ FILE* fptr = NULL;
+ int size = 0;
+ char* buf = malloc(sizeof(char));
+
+ fptr = fopen("test.jpg", "r");
+ while(fread(buf, sizeof(char), 1, fptr)) {
+ size++;
+ }
+ fseek(fptr, 0L, SEEK_SET);
+ printf("file size in bufs: %i\n", size);
+ free(buf);
+ buf = NULL;
+
+ buf = malloc(sizeof(char) * size);
+ fread(buf, size, 1, fptr);
+ fclose(fptr);
+
+ free(buf);
+ buf = NULL;
+ return 0;
+
kds_s2000w_convert_init();
kds_s2000w_convert_jpg_to_pnm("test.jpg");
kds_s2000w_convert_terminate();