aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/image.c b/src/image.c
index f4def3e681e..b2951dd70fb 100644
--- a/src/image.c
+++ b/src/image.c
@@ -7617,7 +7617,6 @@ imagemagick_load_image (struct frame *f, struct image *img,
7617 EMACS_INT ino; 7617 EMACS_INT ino;
7618 int desired_width, desired_height; 7618 int desired_width, desired_height;
7619 double rotation; 7619 double rotation;
7620 EMACS_INT imagemagick_rendermethod;
7621 int pixelwidth; 7620 int pixelwidth;
7622 ImageInfo *image_info; 7621 ImageInfo *image_info;
7623 ExceptionInfo *exception; 7622 ExceptionInfo *exception;
@@ -7798,9 +7797,8 @@ imagemagick_load_image (struct frame *f, struct image *img,
7798 went ok. */ 7797 went ok. */
7799 7798
7800 init_color_table (); 7799 init_color_table ();
7801 imagemagick_rendermethod = (INTEGERP (Vimagemagick_render_type) 7800
7802 ? XINT (Vimagemagick_render_type) : 0); 7801 if (imagemagick_render_type == 0)
7803 if (imagemagick_rendermethod == 0)
7804 { 7802 {
7805 size_t image_height; 7803 size_t image_height;
7806 7804
@@ -7850,8 +7848,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7850 } 7848 }
7851 DestroyPixelIterator (iterator); 7849 DestroyPixelIterator (iterator);
7852 } 7850 }
7853 7851 else /* imagemagick_render_type != 0 */
7854 if (imagemagick_rendermethod == 1)
7855 { 7852 {
7856 /* Magicexportimage is normally faster than pixelpushing. This 7853 /* Magicexportimage is normally faster than pixelpushing. This
7857 method is also well tested. Some aspects of this method are 7854 method is also well tested. Some aspects of this method are
@@ -7986,6 +7983,7 @@ DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0,
7986Each entry in this list is a symbol named after an ImageMagick format 7983Each entry in this list is a symbol named after an ImageMagick format
7987tag. See the ImageMagick manual for a list of ImageMagick formats and 7984tag. See the ImageMagick manual for a list of ImageMagick formats and
7988their descriptions (http://www.imagemagick.org/script/formats.php). 7985their descriptions (http://www.imagemagick.org/script/formats.php).
7986You can also try the shell command: `identify -list format'.
7989 7987
7990Note that ImageMagick recognizes many file-types that Emacs does not 7988Note that ImageMagick recognizes many file-types that Emacs does not
7991recognize as images, such as C. See `imagemagick-types-inhibit'. */) 7989recognize as images, such as C. See `imagemagick-types-inhibit'. */)
@@ -8958,8 +8956,17 @@ The value can also be nil, meaning the cache is never cleared.
8958The function `clear-image-cache' disregards this variable. */); 8956The function `clear-image-cache' disregards this variable. */);
8959 Vimage_cache_eviction_delay = make_number (300); 8957 Vimage_cache_eviction_delay = make_number (300);
8960#ifdef HAVE_IMAGEMAGICK 8958#ifdef HAVE_IMAGEMAGICK
8961 DEFVAR_LISP ("imagemagick-render-type", Vimagemagick_render_type, 8959 DEFVAR_INT ("imagemagick-render-type", imagemagick_render_type,
8962 doc: /* Choose between ImageMagick render methods. */); 8960 doc: /* Integer indicating which ImageMagick rendering method to use.
8961The options are:
8962 0 -- the default method (pixel pushing)
8963 1 -- a newer method ("MagickExportImagePixels") that may perform
8964 better (speed etc) in some cases, but has not been as thoroughly
8965 tested with Emacs as the default method. This method requires
8966 ImageMagick version 6.4.6 (approximately) or later.
8967*/);
8968 /* MagickExportImagePixels is in 6.4.6-9, but not 6.4.4-10. */
8969 imagemagick_render_type = 0;
8963#endif 8970#endif
8964 8971
8965} 8972}