From f13d3950b0abe34e9cbe25f6ecc9c6cd8e9de4fb Mon Sep 17 00:00:00 2001 From: jastornig Date: Sat, 23 Sep 2023 20:30:25 +0000 Subject: [PATCH] (fix) image loader windows --- image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/image.c b/image.c index bc8417b..6818cf8 100644 --- a/image.c +++ b/image.c @@ -68,8 +68,8 @@ Image * load_pgm_image(char * image_file_string){ Image** import_images(char* image_file_string, char* label_file_string, int* _number_imported, int count) { printf("Loading Images\n"); // create file pointer for the image and label data - FILE* image_file = fopen(image_file_string, "r"); - FILE* label_file = fopen(label_file_string, "r"); + FILE* image_file = fopen(image_file_string, "rb"); + FILE* label_file = fopen(label_file_string, "rb"); // check if the file could be opened if(image_file == NULL || label_file == NULL) {