diff options
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/image.c b/src/image.c index f4def3e681e..21f97c32a0c 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 |
| @@ -8958,8 +8955,17 @@ The value can also be nil, meaning the cache is never cleared. | |||
| 8958 | The function `clear-image-cache' disregards this variable. */); | 8955 | The function `clear-image-cache' disregards this variable. */); |
| 8959 | Vimage_cache_eviction_delay = make_number (300); | 8956 | Vimage_cache_eviction_delay = make_number (300); |
| 8960 | #ifdef HAVE_IMAGEMAGICK | 8957 | #ifdef HAVE_IMAGEMAGICK |
| 8961 | DEFVAR_LISP ("imagemagick-render-type", Vimagemagick_render_type, | 8958 | DEFVAR_INT ("imagemagick-render-type", imagemagick_render_type, |
| 8962 | doc: /* Choose between ImageMagick render methods. */); | 8959 | doc: /* Integer indicating which ImageMagick rendering method to use. |
| 8960 | The options are: | ||
| 8961 | 0 -- the default method (pixel pushing) | ||
| 8962 | 1 -- a newer method ("MagickExportImagePixels") that may perform | ||
| 8963 | better (speed etc) in some cases, but has not been as thoroughly | ||
| 8964 | tested with Emacs as the default method. This method requires | ||
| 8965 | ImageMagick version 6.4.6 (approximately) or later. | ||
| 8966 | */); | ||
| 8967 | /* MagickExportImagePixels is in 6.4.6-9, but not 6.4.4-10. */ | ||
| 8968 | imagemagick_render_type = 0; | ||
| 8963 | #endif | 8969 | #endif |
| 8964 | 8970 | ||
| 8965 | } | 8971 | } |