(jpeg_load, png_load, slurp_file): Read image files
as binary.
This commit is contained in:
parent
344630d63c
commit
c45bb3b2c8
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,13 @@
|
|||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue