aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2006-05-10 08:23:20 +0000
committerYAMAMOTO Mitsuharu2006-05-10 08:23:20 +0000
commit8c88cb181bd867042c4ddbb2ec4bd04cea2bf5e0 (patch)
tree0e8a1d979d81e424a7eae1bf7556776e11100f4f /src/image.c
parentb905e809274d552c97269a1ac0ace60b0c538476 (diff)
downloademacs-8c88cb181bd867042c4ddbb2ec4bd04cea2bf5e0.tar.gz
emacs-8c88cb181bd867042c4ddbb2ec4bd04cea2bf5e0.zip
(Qduration) [MAC_OS]: Undo previous change.
(syms_of_image) [MAC_OS]: Likewise. [MAC_OS] (gif_load): Emulate Graphic Control Extension block.
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/image.c b/src/image.c
index 37c3bd48209..f309a401139 100644
--- a/src/image.c
+++ b/src/image.c
@@ -7899,8 +7899,6 @@ gif_load (f, img)
7899#else /* !HAVE_GIF */ 7899#else /* !HAVE_GIF */
7900 7900
7901#ifdef MAC_OS 7901#ifdef MAC_OS
7902static Lisp_Object Qduration;
7903
7904static int 7902static int
7905gif_load (f, img) 7903gif_load (f, img)
7906 struct frame *f; 7904 struct frame *f;
@@ -8067,9 +8065,21 @@ gif_load (f, img)
8067 DisposeHandle (dh); 8065 DisposeHandle (dh);
8068 8066
8069 /* Save GIF image extension data for `image-extension-data'. 8067 /* Save GIF image extension data for `image-extension-data'.
8070 Format is (count IMAGES duration DURATION). */ 8068 Format is (count IMAGES 0xf9 GRAPHIC_CONTROL_EXTENSION_BLOCK). */
8071 img->data.lisp_val = list4 (Qcount, make_number (nsamples), Qduration, 8069 {
8072 make_float ((double)duration / time_scale)); 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 }
8073 8083
8074 /* Maybe fill in the background field while we have ximg handy. */ 8084 /* Maybe fill in the background field while we have ximg handy. */
8075 if (NILP (image_spec_value (img->spec, QCbackground, NULL))) 8085 if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
@@ -8626,11 +8636,6 @@ non-numeric, there is no explicit limit on the size of images. */);
8626 ADD_IMAGE_TYPE(Qgif); 8636 ADD_IMAGE_TYPE(Qgif);
8627#endif 8637#endif
8628 8638
8629#ifdef MAC_OS
8630 Qduration = intern ("duration");
8631 staticpro (&Qduration);
8632#endif
8633
8634#if defined (HAVE_PNG) || defined (MAC_OS) 8639#if defined (HAVE_PNG) || defined (MAC_OS)
8635 Qpng = intern ("png"); 8640 Qpng = intern ("png");
8636 staticpro (&Qpng); 8641 staticpro (&Qpng);