mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
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.
This commit is contained in:
parent
1f0f21c511
commit
af008560fe
6 changed files with 36 additions and 15 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2012-02-07 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* display.texi (ImageMagick Images):
|
||||
Move most details of imagemagick-render-type to the variable's doc.
|
||||
|
||||
2012-02-06 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* keymaps.texi (Tool Bar): Mention separators.
|
||||
|
|
|
|||
|
|
@ -4543,14 +4543,10 @@ loader will be used in practice depends on the priority of the loaders).
|
|||
For example, if you never want to use the ImageMagick loader to use
|
||||
JPEG files, add @code{JPG} to this list.
|
||||
|
||||
@c Not sure this should even be in the manual at all.
|
||||
@vindex imagemagick-render-type
|
||||
You can set the variable @code{imagemagick-render-type} to choose
|
||||
between screen render methods for the ImageMagick loader. The options
|
||||
are: @code{0}, a conservative method which works with older
|
||||
@c FIXME details of this "newer method"?
|
||||
@c Presumably it is faster but may be less "robust"?
|
||||
ImageMagick versions (it is a bit slow, but robust); and @code{1},
|
||||
a newer ImageMagick method.
|
||||
If you wish to experiment with the performance of the ImageMagick
|
||||
loader, see the variable @code{imagemagick-render-type}.
|
||||
|
||||
Images loaded with ImageMagick support a few new display specifications:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
2012-02-07 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* cus-start.el (imagemagick-render-type): Add it.
|
||||
|
||||
2012-02-06 Lars Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* progmodes/cc-mode.el
|
||||
|
|
|
|||
|
|
@ -237,6 +237,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
|
|||
:set custom-set-minor-mode)
|
||||
;; fringe.c
|
||||
(overflow-newline-into-fringe fringe boolean)
|
||||
;; image.c
|
||||
(imagemagick-render-type image integer "24.1")
|
||||
;; indent.c
|
||||
(indent-tabs-mode indent boolean)
|
||||
;; keyboard.c
|
||||
|
|
@ -504,6 +506,8 @@ since it could result in memory overflow and make Emacs crash."
|
|||
(fboundp 'x-selection-exists-p))
|
||||
((string-match "fringe" (symbol-name symbol))
|
||||
(fboundp 'define-fringe-bitmap))
|
||||
((string-match "\\`imagemagick" (symbol-name symbol))
|
||||
(fboundp 'imagemagick-types))
|
||||
((equal "font-use-system-font" (symbol-name symbol))
|
||||
(featurep 'system-font-setting))
|
||||
;; Conditioned on x-create-frame, because that's
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
2012-02-07 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* 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.
|
||||
|
||||
2012-02-06 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* doc.c (store_function_docstring): Avoid applying docstring of
|
||||
|
|
|
|||
22
src/image.c
22
src/image.c
|
|
@ -7617,7 +7617,6 @@ imagemagick_load_image (struct frame *f, struct image *img,
|
|||
EMACS_INT ino;
|
||||
int desired_width, desired_height;
|
||||
double rotation;
|
||||
EMACS_INT imagemagick_rendermethod;
|
||||
int pixelwidth;
|
||||
ImageInfo *image_info;
|
||||
ExceptionInfo *exception;
|
||||
|
|
@ -7798,9 +7797,8 @@ imagemagick_load_image (struct frame *f, struct image *img,
|
|||
went ok. */
|
||||
|
||||
init_color_table ();
|
||||
imagemagick_rendermethod = (INTEGERP (Vimagemagick_render_type)
|
||||
? XINT (Vimagemagick_render_type) : 0);
|
||||
if (imagemagick_rendermethod == 0)
|
||||
|
||||
if (imagemagick_render_type == 0)
|
||||
{
|
||||
size_t image_height;
|
||||
|
||||
|
|
@ -7850,8 +7848,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
|
|||
}
|
||||
DestroyPixelIterator (iterator);
|
||||
}
|
||||
|
||||
if (imagemagick_rendermethod == 1)
|
||||
else /* imagemagick_render_type != 0 */
|
||||
{
|
||||
/* Magicexportimage is normally faster than pixelpushing. This
|
||||
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.
|
|||
The function `clear-image-cache' disregards this variable. */);
|
||||
Vimage_cache_eviction_delay = make_number (300);
|
||||
#ifdef HAVE_IMAGEMAGICK
|
||||
DEFVAR_LISP ("imagemagick-render-type", Vimagemagick_render_type,
|
||||
doc: /* Choose between ImageMagick render methods. */);
|
||||
DEFVAR_INT ("imagemagick-render-type", imagemagick_render_type,
|
||||
doc: /* Integer indicating which ImageMagick rendering method to use.
|
||||
The options are:
|
||||
0 -- the default method (pixel pushing)
|
||||
1 -- a newer method ("MagickExportImagePixels") that may perform
|
||||
better (speed etc) in some cases, but has not been as thoroughly
|
||||
tested with Emacs as the default method. This method requires
|
||||
ImageMagick version 6.4.6 (approximately) or later.
|
||||
*/);
|
||||
/* MagickExportImagePixels is in 6.4.6-9, but not 6.4.4-10. */
|
||||
imagemagick_render_type = 0;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue