Fix to file read on Windows
This commit is contained in:
parent
697985d754
commit
75c2d4b90d
|
@ -16,7 +16,7 @@ struct jpeg_decompress_struct cs_get_markers(const char *input)
|
||||||
jpeg_create_decompress(&einfo);
|
jpeg_create_decompress(&einfo);
|
||||||
|
|
||||||
//Check for errors
|
//Check for errors
|
||||||
if ((fp = fopen(input, "r")) == NULL) {
|
if ((fp = fopen(input, "rb")) == NULL) {
|
||||||
display_error(ERROR, 200);
|
display_error(ERROR, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ bool cs_jpeg_optimize(const char *input_file, const char *output_file, bool exif
|
||||||
jpeg_create_compress(&dstinfo);
|
jpeg_create_compress(&dstinfo);
|
||||||
|
|
||||||
//Check for errors
|
//Check for errors
|
||||||
if ((fp = fopen(input_file, "r")) == NULL) {
|
if ((fp = fopen(input_file, "rb")) == NULL) {
|
||||||
display_error(ERROR, 201);
|
display_error(ERROR, 201);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue