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