diff options
| author | Karoly Lorentey | 2005-10-09 20:00:17 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-10-09 20:00:17 +0000 |
| commit | 0ff21b4e57b1dc7c714c21c9eea1a4906630ecf2 (patch) | |
| tree | 3e8596405b243531128cd0f1d8f59d2ab9e7f7c7 /src/image.c | |
| parent | a3c07f683d1f9fbf7c7af0120dfebc5fc34b61fa (diff) | |
| parent | 20ef86730cca82a1a2e212a665c0b119ed2d70b2 (diff) | |
| download | emacs-0ff21b4e57b1dc7c714c21c9eea1a4906630ecf2.tar.gz emacs-0ff21b4e57b1dc7c714c21c9eea1a4906630ecf2.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 118-132, 551-577)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-551
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-552
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-553
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-554
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-555
Remove CVS keywords from newsticker files
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-556
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-557
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-558
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-559
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-560
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-561
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-562
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-563
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-565
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-567
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-568
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-569
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-570
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-571
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-572
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-573
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-574
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-575
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-576
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-577
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-118
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-119
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-120
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-121
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-122
Update from CVS: lisp/mm-url.el (mm-url-decode-entities): Fix regexp.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-123
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-124
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-125
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-126
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-127
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-128
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-129
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-130
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-131
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-132
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-423
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/image.c b/src/image.c index 6ec0734e785..3b6969b0c28 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -2178,7 +2178,7 @@ slurp_file (file, size) | |||
| 2178 | 2178 | ||
| 2179 | if (stat (file, &st) == 0 | 2179 | if (stat (file, &st) == 0 |
| 2180 | && (fp = fopen (file, "rb")) != NULL | 2180 | && (fp = fopen (file, "rb")) != NULL |
| 2181 | && (buf = (char *) xmalloc (st.st_size), | 2181 | && (buf = (unsigned char *) xmalloc (st.st_size), |
| 2182 | fread (buf, 1, st.st_size, fp) == st.st_size)) | 2182 | fread (buf, 1, st.st_size, fp) == st.st_size)) |
| 2183 | { | 2183 | { |
| 2184 | *size = st.st_size; | 2184 | *size = st.st_size; |
| @@ -3029,7 +3029,7 @@ xbm_read_bitmap_data (contents, end, width, height, data) | |||
| 3029 | 3029 | ||
| 3030 | bytes_per_line = (*width + 7) / 8 + padding_p; | 3030 | bytes_per_line = (*width + 7) / 8 + padding_p; |
| 3031 | nbytes = bytes_per_line * *height; | 3031 | nbytes = bytes_per_line * *height; |
| 3032 | p = *data = (char *) xmalloc (nbytes); | 3032 | p = *data = (unsigned char *) xmalloc (nbytes); |
| 3033 | 3033 | ||
| 3034 | if (v10) | 3034 | if (v10) |
| 3035 | { | 3035 | { |
| @@ -7369,8 +7369,17 @@ gif_load (f, img) | |||
| 7369 | return 0; | 7369 | return 0; |
| 7370 | } | 7370 | } |
| 7371 | 7371 | ||
| 7372 | width = img->width = max (gif->SWidth, gif->Image.Left + gif->Image.Width); | 7372 | image_top = gif->SavedImages[ino].ImageDesc.Top; |
| 7373 | height = img->height = max (gif->SHeight, gif->Image.Top + gif->Image.Height); | 7373 | image_left = gif->SavedImages[ino].ImageDesc.Left; |
| 7374 | image_width = gif->SavedImages[ino].ImageDesc.Width; | ||
| 7375 | image_height = gif->SavedImages[ino].ImageDesc.Height; | ||
| 7376 | |||
| 7377 | width = img->width = max (gif->SWidth, | ||
| 7378 | max (gif->Image.Left + gif->Image.Width, | ||
| 7379 | image_left + image_width)); | ||
| 7380 | height = img->height = max (gif->SHeight, | ||
| 7381 | max (gif->Image.Top + gif->Image.Height, | ||
| 7382 | image_top + image_height)); | ||
| 7374 | 7383 | ||
| 7375 | /* Create the X image and pixmap. */ | 7384 | /* Create the X image and pixmap. */ |
| 7376 | if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) | 7385 | if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) |
| @@ -7405,11 +7414,6 @@ gif_load (f, img) | |||
| 7405 | requires more than can be done here (see the gif89 spec, | 7414 | requires more than can be done here (see the gif89 spec, |
| 7406 | disposal methods). Let's simply assume that the part | 7415 | disposal methods). Let's simply assume that the part |
| 7407 | not covered by a sub-image is in the frame's background color. */ | 7416 | not covered by a sub-image is in the frame's background color. */ |
| 7408 | image_top = gif->SavedImages[ino].ImageDesc.Top; | ||
| 7409 | image_left = gif->SavedImages[ino].ImageDesc.Left; | ||
| 7410 | image_width = gif->SavedImages[ino].ImageDesc.Width; | ||
| 7411 | image_height = gif->SavedImages[ino].ImageDesc.Height; | ||
| 7412 | |||
| 7413 | for (y = 0; y < image_top; ++y) | 7417 | for (y = 0; y < image_top; ++y) |
| 7414 | for (x = 0; x < width; ++x) | 7418 | for (x = 0; x < width; ++x) |
| 7415 | XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); | 7419 | XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); |