| Server IP : 217.160.0.212 / Your IP : 216.73.216.141 Web Server : Apache System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/image/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313\314\315& \207" [require cl-generic custom-declare-variable image-converter funcall function #[0 "\300\207" [nil] 1 ""] "Type of the external image converter to use.\nThe value should a symbol, either `imagemagick', `graphicsmagick',\nor `ffmpeg'.\n\nIf nil, Emacs will try to find one of the supported converters\ninstalled on the system.\n\nThe actual range of image formats that will be converted depends\non what image formats the chosen converter reports being able to\nhandle. `auto-mode-alist' is then used to further filter what\nformats that are to be supported: Only the suffixes that map to\n`image-mode' will be handled." :group image :type symbol :version "27.1"] 10)
#@69 A regexp that matches the file name suffixes that can be converted.
(defvar image-converter-regexp nil (#$ . 833))
#@53 A list of file name suffixes that can be converted.
(defvar image-converter-file-name-extensions nil (#$ . 954))
#@44 List of supported image converters to try.
(defvar image-converter--converters '((graphicsmagick :command ("gm" "convert") :probe ("-list" "format")) (ffmpeg :command "ffmpeg" :probe "-decoders") (imagemagick :command "convert" :probe ("-list" "format"))) (#$ . 1073))
#@290 Return `image-convert' if SOURCE is an image that can be converted.
SOURCE can either be a file name or a string containing image
data. In the latter case, DATA-P should be non-nil. If DATA-P
is a string, it should be a MIME format string like
"image/gif".
(fn SOURCE &optional DATA-P)
(defalias 'image-convert-p #[513 "\204 \303 \210\203 \204 \304!\211\203 \305\306!\307Q\211\210\205M \211\204/ \310 \"\204L \211\205M \2119\205M \311\312\313!\"\205M \310 \314\315!P\"\205M \316\207" [image-converter image-converter-regexp image-converter-file-name-extensions image-converter--find-converter image-converter--probe "\\." regexp-opt "\\'" string-match string-search "/" symbol-name "foo." image-converter--mime-type image-convert] 7 (#$ . 1349)])
#@492 Convert IMAGE file to the PNG format.
IMAGE can either be a file name or image data.
To pass in image data, IMAGE should a string containing the image
data, and IMAGE-FORMAT should be a symbol with a MIME format name
like "image/webp". For instance:
(image-convert data-string 'image/bmp)
IMAGE can also be an image object as returned by `create-image'.
This function converts the image to PNG, and the converted image
data is returned as a string.
(fn IMAGE &optional IMAGE-FORMAT)
(defalias 'image-convert #[513 "\204 \301 \210\204 \302\303!\210\211\203# \304\305!\306\"G\307U\204# \302\310!\210\311\312\313\"r\211q\210\314\315\"\216\316\317!\210\320<\203C \321A\322\"\202D <\203R \321A\323\"\202S #\211\203] \302\324\"\210\210<\203\243 \325\326\327 \330\313A\317\211\211\211:\203\233 \262\211A\262\242\262@\262\331=\204\223 \332D!\244\262AA\262\202p \211\237\266\205%\202\245 \327 *\207" [image-converter image-converter--find-converter error "No external image converters available" split-string symbol-name "/" 2 "IMAGE-FORMAT should be a symbol like `image/png'" generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] set-buffer-multibyte nil image-converter--convert plist-get :file :data-p "%s" apply create-image buffer-string png :type reverse] 16 (#$ . 2121)])
#@67 Return the value of ELEM of image converter TYPE.
(fn TYPE ELEM)
(defalias 'image-converter--value #[514 "\301\236A\"\211;\203 \211C\207\207" [image-converter--converters plist-get] 5 (#$ . 3497)])
(byte-code "\300\301\302\303\302\304%\210\300\301\302\305\302\306%\210\300\301\302\307\302\310%\207" [cl-generic-define-method image-converter--probe nil ((type (eql 'graphicsmagick))) #[257 "\300\301\302\"r\211q\210\303\304\"\216\305\306\"\307\310@!\205T \311\312@\307\313\307\314A\305\f\315\"\"&\316U\205T eb\210\317\320\307\302#\203R \321y\210\317\322\307\302#\203R \323\321!\227B\262\202? \211\237\266\202*\207" [generate-new-buffer #1=" *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] image-converter--value :command nil executable-find apply call-process (t nil) append :probe 0 re-search-forward "^-" 1 "^ *\\([A-Z0-9]+\\) +. +r" match-string] 15 "Check whether the system has GraphicsMagick installed.\n\n(fn TYPE)"] ((type (eql 'imagemagick))) #[257 "\300\301\302\"r\211q\210\303\304\"\216\305\306\"\307\310@!\203- \311\312@\307\313\307\314A\305\f\315\"\"&\210eb\210\316\317\307\302#\203N \320y\210\316\321\307\302#\203N \322\320!\227B\262\202; \211\237\266\202*\207" [generate-new-buffer #1# t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] image-converter--value :command nil executable-find apply call-process (t nil) append :probe re-search-forward "^-" 1 "^ *\\([A-Z0-9]+\\)\\*?\\(?: +[A-Z0-9]+\\)? +r" match-string] 15 "Check whether the system has ImageMagick installed.\n\n(fn TYPE)"] ((type (eql 'ffmpeg))) #[257 "\300\301\302\"r\211q\210\303\304\"\216\305\306\"\307\310@!\205S \311\312@\307\313\307\314A\305\f\315\"\"&\316U\205S eb\210\317\320\307\302#\203Q \321y\210\317\322\307\302#\203Q \323\321!B\262\202? \211\237\266\202*\207" [generate-new-buffer #1# t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] image-converter--value :command nil executable-find apply call-process (t nil) append :probe 0 re-search-forward "^ *-" 1 "^ *V[^ ]+ +\\([a-z0-9_]+\\)" match-string] 15 "Check whether the system has ffmpeg installed.\n\n(fn TYPE)"]] 6)
#@36 Find an installed image converter.
(defalias 'image-converter--find-converter #[0 "\30421 \211\205. \211@\305\306@!!\211\203&