aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorKaroly Lorentey2006-05-10 15:04:01 +0000
committerKaroly Lorentey2006-05-10 15:04:01 +0000
commit8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e (patch)
tree6262988e87d6b347a8c90fcc3c5b49f9bb5b36e1 /src/image.c
parentf6cf85ac95e469835a2643024f995b471a4c5d52 (diff)
parent9a4d87c8d5f4503d67d5155eae6d543cc31f86d0 (diff)
downloademacs-8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e.tar.gz
emacs-8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-266 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-267 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-268 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-269 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-270 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-271 Rename "field-at-point" to "field-at-pos" * emacs@sv.gnu.org/emacs--devo--0--patch-272 (comint-insert-input): Remove redundant calls to setq and goto-char git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-556
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/image.c b/src/image.c
index eae25fdb02e..98e44be9d44 100644
--- a/src/image.c
+++ b/src/image.c
@@ -2630,7 +2630,7 @@ image_load_quartz2d (f, img, png_p)
2630 UNGCPRO; 2630 UNGCPRO;
2631 return 0; 2631 return 0;
2632 } 2632 }
2633 path = cfstring_create_with_string (file); 2633 path = cfstring_create_with_utf8_cstring (SDATA (file));
2634 url = CFURLCreateWithFileSystemPath (NULL, path, 2634 url = CFURLCreateWithFileSystemPath (NULL, path,
2635 kCFURLPOSIXPathStyle, 0); 2635 kCFURLPOSIXPathStyle, 0);
2636 CFRelease (path); 2636 CFRelease (path);
@@ -7901,6 +7901,8 @@ gif_load (f, img)
7901#else /* !HAVE_GIF */ 7901#else /* !HAVE_GIF */
7902 7902
7903#ifdef MAC_OS 7903#ifdef MAC_OS
7904static Lisp_Object Qduration;
7905
7904static int 7906static int
7905gif_load (f, img) 7907gif_load (f, img)
7906 struct frame *f; 7908 struct frame *f;
@@ -7922,7 +7924,8 @@ gif_load (f, img)
7922 RGBColor bg_color; 7924 RGBColor bg_color;
7923 int width, height; 7925 int width, height;
7924 XImagePtr ximg; 7926 XImagePtr ximg;
7925 TimeValue time; 7927 TimeScale time_scale;
7928 TimeValue time, duration;
7926 int ino; 7929 int ino;
7927 CGrafPtr old_port; 7930 CGrafPtr old_port;
7928 GDHandle old_gdh; 7931 GDHandle old_gdh;
@@ -8030,6 +8033,7 @@ gif_load (f, img)
8030 image, img->spec); 8033 image, img->spec);
8031 goto error; 8034 goto error;
8032 } 8035 }
8036 time_scale = GetMediaTimeScale (media);
8033 8037
8034 specified_bg = image_spec_value (img->spec, QCbackground, NULL); 8038 specified_bg = image_spec_value (img->spec, QCbackground, NULL);
8035 if (!STRINGP (specified_bg) || 8039 if (!STRINGP (specified_bg) ||
@@ -8055,7 +8059,7 @@ gif_load (f, img)
8055 SetGWorld (old_port, old_gdh); 8059 SetGWorld (old_port, old_gdh);
8056 SetMovieActive (movie, 1); 8060 SetMovieActive (movie, 1);
8057 SetMovieGWorld (movie, ximg, NULL); 8061 SetMovieGWorld (movie, ximg, NULL);
8058 SampleNumToMediaTime (media, ino + 1, &time, NULL); 8062 SampleNumToMediaTime (media, ino + 1, &time, &duration);
8059 SetMovieTimeValue (movie, time); 8063 SetMovieTimeValue (movie, time);
8060 MoviesTask (movie, 0L); 8064 MoviesTask (movie, 0L);
8061 DisposeTrackMedia (media); 8065 DisposeTrackMedia (media);
@@ -8063,6 +8067,12 @@ gif_load (f, img)
8063 DisposeMovie (movie); 8067 DisposeMovie (movie);
8064 if (dh) 8068 if (dh)
8065 DisposeHandle (dh); 8069 DisposeHandle (dh);
8070
8071 /* Save GIF image extension data for `image-extension-data'.
8072 Format is (count IMAGES duration DURATION). */
8073 img->data.lisp_val = list4 (Qcount, make_number (nsamples), Qduration,
8074 make_float ((double)duration / time_scale));
8075
8066 /* Maybe fill in the background field while we have ximg handy. */ 8076 /* Maybe fill in the background field while we have ximg handy. */
8067 if (NILP (image_spec_value (img->spec, QCbackground, NULL))) 8077 if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
8068 IMAGE_BACKGROUND (img, f, ximg); 8078 IMAGE_BACKGROUND (img, f, ximg);
@@ -8618,6 +8628,11 @@ non-numeric, there is no explicit limit on the size of images. */);
8618 ADD_IMAGE_TYPE(Qgif); 8628 ADD_IMAGE_TYPE(Qgif);
8619#endif 8629#endif
8620 8630
8631#ifdef MAC_OS
8632 Qduration = intern ("duration");
8633 staticpro (&Qduration);
8634#endif
8635
8621#if defined (HAVE_PNG) || defined (MAC_OS) 8636#if defined (HAVE_PNG) || defined (MAC_OS)
8622 Qpng = intern ("png"); 8637 Qpng = intern ("png");
8623 staticpro (&Qpng); 8638 staticpro (&Qpng);