aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2004-06-14 21:11:21 +0000
committerJuanma Barranquero2004-06-14 21:11:21 +0000
commitda4b7798eef8e8d06df1230da023d048d7473669 (patch)
treeb23f5ae9cc47dd60b6cc2584520c3dda25374262
parentfe34703418bc6b49b420ed30f48ad8abeaf4bc76 (diff)
downloademacs-da4b7798eef8e8d06df1230da023d048d7473669.tar.gz
emacs-da4b7798eef8e8d06df1230da023d048d7473669.zip
(Images): Document new delayed library loading, variable
`image-library-alist' and (existing but undocumented) function `image-type-available-p'.
-rw-r--r--lispref/display.texi49
1 files changed, 46 insertions, 3 deletions
diff --git a/lispref/display.texi b/lispref/display.texi
index 70f57632533..1f8868981b7 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -2875,8 +2875,13 @@ property of text that is displayed (@pxref{Display Property}). Like the
2875@code{display} property, this feature is available starting in Emacs 21. 2875@code{display} property, this feature is available starting in Emacs 21.
2876 2876
2877 Emacs can display a number of different image formats; some of them 2877 Emacs can display a number of different image formats; some of them
2878are supported only if particular support libraries are installed on your 2878are supported only if particular support libraries are installed on
2879machine. The supported image formats include XBM, XPM (needing the 2879your machine. In some environments, Emacs allows loading image
2880libraries on demand; if so, the variable @code{image-library-alist}
2881can be used to modify the set of known names for these dynamic
2882libraries (though it is not posible to add new image formats).
2883
2884 The supported image formats include XBM, XPM (needing the
2880libraries @code{libXpm} version 3.4k and @code{libz}), GIF (needing 2885libraries @code{libXpm} version 3.4k and @code{libz}), GIF (needing
2881@code{libungif} 4.1.0), Postscript, PBM, JPEG (needing the 2886@code{libungif} 4.1.0), Postscript, PBM, JPEG (needing the
2882@code{libjpeg} library version v6a), TIFF (needing @code{libtiff} v3.4), 2887@code{libjpeg} library version v6a), TIFF (needing @code{libtiff} v3.4),
@@ -2887,10 +2892,48 @@ type symbols are @code{xbm}, @code{xpm}, @code{gif}, @code{postscript},
2887@code{pbm}, @code{jpeg}, @code{tiff}, and @code{png}. 2892@code{pbm}, @code{jpeg}, @code{tiff}, and @code{png}.
2888 2893
2889@defvar image-types 2894@defvar image-types
2895@vindex image-types
2890This variable contains a list of those image type symbols that are 2896This variable contains a list of those image type symbols that are
2891supported in the current configuration. 2897potentially supported in the current configuration.
2898@emph{Potentially} here means that Emacs knows about the image types,
2899not necessarily that they can be loaded (they could depend on
2900unavailable dynamic libraries, for example).
2901
2902To know which image types are really available, use
2903@code{image-type-available-p}.
2892@end defvar 2904@end defvar
2893 2905
2906@defvar image-library-alist
2907@vindex image-library-alist
2908This in an alist of image types vs external libraries needed to
2909display them.
2910
2911Each element is a list @code{(@var{IMAGE-TYPE} @var{LIBRARY}...)},
2912where the car is a supported image format from @code{image-types}, and
2913the rest are strings giving alternate filenames for the corresponding
2914external libraries to load.
2915
2916They are tried in the order they appear on the list; if none of them
2917can be loaded, the running session of Emacs won't support the image
2918type. No entries are needed for @code{pbm} and @code{xbm} images;
2919they're always supported.
2920
2921This variable is ignored if the image libraries are statically linked
2922into Emacs.
2923@end defvar
2924
2925@defun image-type-available-p type
2926@findex image-type-available-p
2927
2928This function returns non-nil if image type TYPE is available, i.e.,
2929if images of this type can be loaded and displayed in Emacs. TYPE
2930should be one of the types contained in @code{image-types}.
2931
2932For image types whose support libraries are statically linked, this
2933function always returns @code{t}; for other image types, it returns
2934@code{t} if the dynamic library could be loaded, @code{nil} otherwise.
2935@end defun
2936
2894@menu 2937@menu
2895* Image Descriptors:: How to specify an image for use in @code{:display}. 2938* Image Descriptors:: How to specify an image for use in @code{:display}.
2896* XBM Images:: Special features for XBM format. 2939* XBM Images:: Special features for XBM format.