Commit c45bb3b2 authored by Jason Rumney's avatar Jason Rumney

(jpeg_load, png_load, slurp_file): Read image files

as binary.
parent 344630d6
2003-03-16 Jason Rumney <jasonr@gnu.org>
* w32gui.h: Use HDC for Display.
* w32term.c (w32_encode_char): Prevent double-byte chars from
crashing Emacs.
* w32fns.c (jpeg_load, png_load, slurp_file): Read image files
as binary.
2003-03-16 Juanma Barranquero <lektu@terra.es>
* xdisp.c (x_produce_glyphs): Use FRAME_BASELINE_OFFSET.
......
......@@ -9535,7 +9535,7 @@ slurp_file (file, size)
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 @@ pbm_read_file (file, size)
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 @@ jpeg_load (f, img)
return 0;
}
fp = fopen (SDATA (file), "r");
fp = fopen (SDATA (file), "rb");
if (fp == NULL)
{
image_error ("Cannot open `%s'", file, Qnil);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment