aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorMiles Bader2006-05-10 20:42:41 +0000
committerMiles Bader2006-05-10 20:42:41 +0000
commit3bcf2b084a0dd1ff0399480d57b87e01cfe061dc (patch)
tree355c68cda5a5c9c73824840df3cdae6320017283 /src/image.c
parent0ea38cf9dca8f2b148d78f638eed17e8896984af (diff)
parentd105bfecce2288cd99f591382586a22a4ce1b6f2 (diff)
downloademacs-3bcf2b084a0dd1ff0399480d57b87e01cfe061dc.tar.gz
emacs-3bcf2b084a0dd1ff0399480d57b87e01cfe061dc.zip
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-60
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 259-273) - Update from CVS - lisp/replace.el (occur-engine): Bind `inhibit-field-text-motion' to t - Merge from gnus--rel--5.10 - Rename "field-at-point" to "field-at-pos" - (comint-insert-input): Remove redundant calls to setq and goto-char * gnus--rel--5.10 (patch 99-100) - Merge from emacs--devo--0 - Update from CVS
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/image.c b/src/image.c
index 688ff200055..f309a401139 100644
--- a/src/image.c
+++ b/src/image.c
@@ -2628,7 +2628,7 @@ image_load_quartz2d (f, img, png_p)
2628 UNGCPRO; 2628 UNGCPRO;
2629 return 0; 2629 return 0;
2630 } 2630 }
2631 path = cfstring_create_with_string (file); 2631 path = cfstring_create_with_utf8_cstring (SDATA (file));
2632 url = CFURLCreateWithFileSystemPath (NULL, path, 2632 url = CFURLCreateWithFileSystemPath (NULL, path,
2633 kCFURLPOSIXPathStyle, 0); 2633 kCFURLPOSIXPathStyle, 0);
2634 CFRelease (path); 2634 CFRelease (path);
@@ -7920,7 +7920,8 @@ gif_load (f, img)
7920 RGBColor bg_color; 7920 RGBColor bg_color;
7921 int width, height; 7921 int width, height;
7922 XImagePtr ximg; 7922 XImagePtr ximg;
7923 TimeValue time; 7923 TimeScale time_scale;
7924 TimeValue time, duration;
7924 int ino; 7925 int ino;
7925 CGrafPtr old_port; 7926 CGrafPtr old_port;
7926 GDHandle old_gdh; 7927 GDHandle old_gdh;
@@ -8028,6 +8029,7 @@ gif_load (f, img)
8028 image, img->spec); 8029 image, img->spec);
8029 goto error; 8030 goto error;
8030 } 8031 }
8032 time_scale = GetMediaTimeScale (media);
8031 8033
8032 specified_bg = image_spec_value (img->spec, QCbackground, NULL); 8034 specified_bg = image_spec_value (img->spec, QCbackground, NULL);
8033 if (!STRINGP (specified_bg) || 8035 if (!STRINGP (specified_bg) ||
@@ -8053,7 +8055,7 @@ gif_load (f, img)
8053 SetGWorld (old_port, old_gdh); 8055 SetGWorld (old_port, old_gdh);
8054 SetMovieActive (movie, 1); 8056 SetMovieActive (movie, 1);
8055 SetMovieGWorld (movie, ximg, NULL); 8057 SetMovieGWorld (movie, ximg, NULL);
8056 SampleNumToMediaTime (media, ino + 1, &time, NULL); 8058 SampleNumToMediaTime (media, ino + 1, &time, &duration);
8057 SetMovieTimeValue (movie, time); 8059 SetMovieTimeValue (movie, time);
8058 MoviesTask (movie, 0L); 8060 MoviesTask (movie, 0L);
8059 DisposeTrackMedia (media); 8061 DisposeTrackMedia (media);
@@ -8061,6 +8063,24 @@ gif_load (f, img)
8061 DisposeMovie (movie); 8063 DisposeMovie (movie);
8062 if (dh) 8064 if (dh)
8063 DisposeHandle (dh); 8065 DisposeHandle (dh);
8066
8067 /* Save GIF image extension data for `image-extension-data'.
8068 Format is (count IMAGES 0xf9 GRAPHIC_CONTROL_EXTENSION_BLOCK). */
8069 {
8070 unsigned char gce[4];
8071 int centisec = ((float)duration / time_scale) * 100.0f + 0.5f;
8072
8073 /* Fill the delay time field. */
8074 gce[1] = centisec & 0xff;
8075 gce[2] = (centisec >> 8) & 0xff;
8076 /* We don't know about other fields. */
8077 gce[0] = gce[3] = 0;
8078
8079 img->data.lisp_val = list4 (Qcount, make_number (nsamples),
8080 make_number (0xf9),
8081 make_unibyte_string (gce, 4));
8082 }
8083
8064 /* Maybe fill in the background field while we have ximg handy. */ 8084 /* Maybe fill in the background field while we have ximg handy. */
8065 if (NILP (image_spec_value (img->spec, QCbackground, NULL))) 8085 if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
8066 IMAGE_BACKGROUND (img, f, ximg); 8086 IMAGE_BACKGROUND (img, f, ximg);