changeset 50164:61b178f7f6dc

(jpeg_load, png_load, slurp_file): Read image files as binary.
author Jason Rumney <jasonr@gnu.org>
date Sun, 16 Mar 2003 22:12:25 +0000
parents 6f30f0db5f30
children d4e583a5a1e0
files src/w32fns.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32fns.c	Sun Mar 16 22:11:04 2003 +0000
+++ b/src/w32fns.c	Sun Mar 16 22:12:25 2003 +0000
@@ -9535,7 +9535,7 @@
   struct stat st;
 
   if (stat (file, &st) == 0
-      && (fp = fopen (file, "r")) != NULL
+      && (fp = fopen (file, "rb")) != NULL
       && (buf = (char *) xmalloc (st.st_size),
 	  fread (buf, 1, st.st_size, fp) == st.st_size))
     {
@@ -11402,7 +11402,7 @@
   struct stat st;
 
   if (stat (SDATA (file), &st) == 0
-      && (fp = fopen (SDATA (file), "r")) != NULL
+      && (fp = fopen (SDATA (file), "rb")) != NULL
       && (buf = (char *) xmalloc (st.st_size),
 	  fread (buf, 1, st.st_size, fp) == st.st_size))
     {
@@ -12495,7 +12495,7 @@
 	  return 0;
 	}
 
-      fp = fopen (SDATA (file), "r");
+      fp = fopen (SDATA (file), "rb");
       if (fp == NULL)
 	{
 	  image_error ("Cannot open `%s'", file, Qnil);