diff options
| author | Glenn Morris | 2012-02-06 19:31:29 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-02-06 19:31:29 -0800 |
| commit | af008560fea31dff76f6d7df3e386cf2af623a8d (patch) | |
| tree | 2d463d836e43ecbde5ba13f7ed81744134c69911 | |
| parent | 1f0f21c51107e8a2d6e223840018dfdf3dbafee2 (diff) | |
| download | emacs-af008560fea31dff76f6d7df3e386cf2af623a8d.tar.gz emacs-af008560fea31dff76f6d7df3e386cf2af623a8d.zip | |
imagemagick-render-type fixes
* src/image.c (imagemagick-render-type): Change it from a lisp object
to an integer. Move the doc here from the lisp manual.
Treat all values not equal to 0 the same.
* doc/lispref/display.texi (ImageMagick Images):
Move most details of imagemagick-render-type to the variable's doc.
* lisp/cus-start.el (imagemagick-render-type): Add it.
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 10 | ||||
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/cus-start.el | 4 | ||||
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/image.c | 22 |
6 files changed, 36 insertions, 15 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 5de2251c19f..163ab80e8b8 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-02-07 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * display.texi (ImageMagick Images): | ||
| 4 | Move most details of imagemagick-render-type to the variable's doc. | ||
| 5 | |||
| 1 | 2012-02-06 Glenn Morris <rgm@gnu.org> | 6 | 2012-02-06 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * keymaps.texi (Tool Bar): Mention separators. | 8 | * keymaps.texi (Tool Bar): Mention separators. |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index e97e6c264a3..e1b2f57e507 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -4543,14 +4543,10 @@ loader will be used in practice depends on the priority of the loaders). | |||
| 4543 | For example, if you never want to use the ImageMagick loader to use | 4543 | For example, if you never want to use the ImageMagick loader to use |
| 4544 | JPEG files, add @code{JPG} to this list. | 4544 | JPEG files, add @code{JPG} to this list. |
| 4545 | 4545 | ||
| 4546 | @c Not sure this should even be in the manual at all. | ||
| 4546 | @vindex imagemagick-render-type | 4547 | @vindex imagemagick-render-type |
| 4547 | You can set the variable @code{imagemagick-render-type} to choose | 4548 | If you wish to experiment with the performance of the ImageMagick |
| 4548 | between screen render methods for the ImageMagick loader. The options | 4549 | loader, see the variable @code{imagemagick-render-type}. |
| 4549 | are: @code{0}, a conservative method which works with older | ||
| 4550 | @c FIXME details of this "newer method"? | ||
| 4551 | @c Presumably it is faster but may be less "robust"? | ||
| 4552 | ImageMagick versions (it is a bit slow, but robust); and @code{1}, | ||
| 4553 | a newer ImageMagick method. | ||
| 4554 | 4550 | ||
| 4555 | Images loaded with ImageMagick support a few new display specifications: | 4551 | Images loaded with ImageMagick support a few new display specifications: |
| 4556 | 4552 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2f21d9e046e..c90d0ac7ea1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-02-07 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * cus-start.el (imagemagick-render-type): Add it. | ||
| 4 | |||
| 1 | 2012-02-06 Lars Ingebrigtsen <larsi@gnus.org> | 5 | 2012-02-06 Lars Ingebrigtsen <larsi@gnus.org> |
| 2 | 6 | ||
| 3 | * progmodes/cc-mode.el | 7 | * progmodes/cc-mode.el |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 2cee72d717e..a5032cf99e7 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -237,6 +237,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 237 | :set custom-set-minor-mode) | 237 | :set custom-set-minor-mode) |
| 238 | ;; fringe.c | 238 | ;; fringe.c |
| 239 | (overflow-newline-into-fringe fringe boolean) | 239 | (overflow-newline-into-fringe fringe boolean) |
| 240 | ;; image.c | ||
| 241 | (imagemagick-render-type image integer "24.1") | ||
| 240 | ;; indent.c | 242 | ;; indent.c |
| 241 | (indent-tabs-mode indent boolean) | 243 | (indent-tabs-mode indent boolean) |
| 242 | ;; keyboard.c | 244 | ;; keyboard.c |
| @@ -504,6 +506,8 @@ since it could result in memory overflow and make Emacs crash." | |||
| 504 | (fboundp 'x-selection-exists-p)) | 506 | (fboundp 'x-selection-exists-p)) |
| 505 | ((string-match "fringe" (symbol-name symbol)) | 507 | ((string-match "fringe" (symbol-name symbol)) |
| 506 | (fboundp 'define-fringe-bitmap)) | 508 | (fboundp 'define-fringe-bitmap)) |
| 509 | ((string-match "\\`imagemagick" (symbol-name symbol)) | ||
| 510 | (fboundp 'imagemagick-types)) | ||
| 507 | ((equal "font-use-system-font" (symbol-name symbol)) | 511 | ((equal "font-use-system-font" (symbol-name symbol)) |
| 508 | (featurep 'system-font-setting)) | 512 | (featurep 'system-font-setting)) |
| 509 | ;; Conditioned on x-create-frame, because that's | 513 | ;; Conditioned on x-create-frame, because that's |
diff --git a/src/ChangeLog b/src/ChangeLog index 860a0592e29..6438f054432 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-02-07 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * image.c (imagemagick-render-type): Change it from a lisp object | ||
| 4 | to an integer. Move the doc here from the lisp manual. | ||
| 5 | Treat all values not equal to 0 the same. | ||
| 6 | |||
| 1 | 2012-02-06 Chong Yidong <cyd@gnu.org> | 7 | 2012-02-06 Chong Yidong <cyd@gnu.org> |
| 2 | 8 | ||
| 3 | * doc.c (store_function_docstring): Avoid applying docstring of | 9 | * doc.c (store_function_docstring): Avoid applying docstring of |
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 | } |