?
Current Path : /usr/share/emacs/24.3/lisp/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/image.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:12:51 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/image.el ;;; in Emacs version 24.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301\302\303\304\305%\210\306\307\310\"\207" [custom-declare-group image nil "Image support." :group multimedia defalias image-refresh image-flush] 6) #@400 Alist of (REGEXP . IMAGE-TYPE) pairs used to auto-detect image types. When the first bytes of an image file match REGEXP, it is assumed to be of image type IMAGE-TYPE if IMAGE-TYPE is a symbol. If not a symbol, IMAGE-TYPE must be a pair (PREDICATE . TYPE). PREDICATE is called with one argument, a string containing the image data. If PREDICATE returns a non-nil value, TYPE is the image's type. (defconst image-type-header-regexps (byte-code "\302\303\304\305\306\307\310\311\312\313\314Q\315 \316\317 \320\321\260*\322B\257 \207" [incomment-re comment-re ("\\`/[ \n ]*\\*.*XPM.\\*/" . xpm) ("\\`P[1-6][[:space:]]+\\(?:#.*[[:space:]]+\\)*[0-9]+[[:space:]]+[0-9]+" . pbm) ("\\`GIF8[79]a" . gif) ("\\`\211PNG \n\n" . png) ("\\`[ \n ]*#define \\([a-z0-9_]+\\)_width [0-9]+\n#define \\1_height [0-9]+\n\\(#define \\1_x_hot [0-9]+\n#define \\1_y_hot [0-9]+\n\\)?static \\(unsigned \\)?char \\1_bits" . xbm) ("\\`\\(?:MM \\*\\|II\\* \\)" . tiff) ("\\`[ \n ]*%!PS" . postscript) ("\\`\377\330" . jpeg) "\\(?:[^-]\\|-[^-]\\)" "\\(?:!--" "*-->[ \n]*<\\)" "\\(?:<\\?xml[ \n]+[^>]*>\\)?[ \n]*<" "*" "\\(?:!DOCTYPE[ \n]+[^>]*>[ \n]*<[ \n]*" "*\\)?" "[Ss][Vv][Gg]" svg] 15) (#$ . 714)) #@159 Alist of (REGEXP . IMAGE-TYPE) pairs used to identify image files. When the name of an image file match REGEXP, it is assumed to be of image type IMAGE-TYPE. (defvar image-type-file-name-regexps '(("\\.png\\'" . png) ("\\.gif\\'" . gif) ("\\.jpe?g\\'" . jpeg) ("\\.bmp\\'" . bmp) ("\\.xpm\\'" . xpm) ("\\.pbm\\'" . pbm) ("\\.xbm\\'" . xbm) ("\\.ps\\'" . postscript) ("\\.tiff?\\'" . tiff) ("\\.svgz?\\'" . svg)) (#$ . 1918)) #@284 Alist of (IMAGE-TYPE . AUTODETECT) pairs used to auto-detect image files. (See `image-type-auto-detected-p'). AUTODETECT can be - t always auto-detect. - nil never auto-detect. - maybe auto-detect only if the image type is available (see `image-type-available-p'). (defvar image-type-auto-detectable '((pbm . t) (xbm) (bmp . maybe) (gif . maybe) (png . maybe) (xpm) (jpeg . maybe) (tiff . maybe) (svg . maybe) (postscript)) (#$ . 2350)) #@330 List of locations in which to search for image files. If an element is a string, it defines a directory to search. If an element is a variable symbol whose value is a string, that value defines a directory to search. If an element is a variable symbol whose value is a list, the value is used as a list of directories to search. (custom-declare-variable 'image-load-path '(list (file-name-as-directory (expand-file-name "images" data-directory)) 'data-directory 'load-path) '(#$ . 2812) :type '(repeat (choice directory variable)) :initialize 'custom-initialize-delay) #@1198 Return a suitable search path for images used by LIBRARY. It searches for IMAGE in `image-load-path' (excluding "`data-directory'/images") and `load-path', followed by a path suitable for LIBRARY, which includes "../../etc/images" and "../etc/images" relative to the library file itself, and then in "`data-directory'/images". Then this function returns a list of directories which contains first the directory in which IMAGE was found, followed by the value of `load-path'. If PATH is given, it is used instead of `load-path'. If NO-ERROR is non-nil and a suitable path can't be found, don't signal an error. Instead, return a list of directories as before, except that nil appears in place of the image directory. Here is an example that uses a common idiom to provide compatibility with versions of Emacs that lack the variable `image-load-path': ;; Shush compiler. (defvar image-load-path) (let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm")) (image-load-path (cons (car load-path) (when (boundp 'image-load-path) image-load-path)))) (mh-tool-bar-folder-buttons-init)) (defalias 'image-load-path-for-library #[(library image &optional path no-error) "\204 \306\307!\210 \204 \306\310!\210\311\211 \312 !\206 \313 !\311 \203A \314 !\314!\211\203A \315\f!\316\317 \"\202+ +\n\203Y \n\320\316\321\"!\232\204Y \n\202\306 \311\211\211\313!\211\204p \306\322\"\210\320\316\314!\323P!!\320\316\314!\324P!!\325\316 \"!\203\227 \202\243 \325\316 \"!\205\243 \211+\204\306 \n\203\262 \n\202\306 \203\300 \326\327 #\210\202\306 \306\327 #\210C\330\331 \206\322 !!\"\244*\207" [library image image-directory-load-path image-directory parent dir error "No library specified" "No image specified" nil image-search-load-path locate-library file-name-directory directory-file-name expand-file-name "../" file-name-as-directory "images" "Cannot find library %s in load-path" "../../etc/images" "../etc/images" file-exists-p message "Could not find image %s for library %s" delete copy-sequence img data-directory d2ei d1ei library-name no-error path load-path] 6 (#$ . 3389)]) #@122 Value is non-nil if DATA, a string, consists of JFIF image data. We accept the tag Exif because that is the same format. (defalias 'image-jpeg-p #[(data) "\305\306\307\217\211\205 \310\305\311\312\n #,\205 \313\314\215\207" [data start string regexp inhibit-changing-match-data nil (string-to-unibyte data) ((error)) "\\`\377\330" t string-match jfif (byte-code "G\306 \nW\205n H\307U\204 \310\311\312\"\210 T\211\306\\\nY\203( \310\311\312\"\210\313 TH\314\" \306\\H\\ H\315Y\203d \316X\203d \310\311\317 \211\f\\\n^O\312\320\321 #,\"\210\322 \323\f#*\202 *\207" [data i len code nbytes start 2 255 throw jfif nil lsh 8 224 239 "JFIF\\|Exif" t string-match + 1 string regexp inhibit-changing-match-data] 8)] 5 (#$ . 5642)]) #@129 Determine the image type from image data DATA. Value is a symbol specifying the image type or nil if type cannot be determined. (defalias 'image-type-from-data #[(data) "\306\n\203L \n@@\n@A9\203+ \f \306 \n\307\310\f\n #,\204>