;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307DD\310\311\312\313\314&\210\303\315\305\306\316DD\317\311\312\313\320&\210\303\321\305\306\322DD\323\311\312\313\324&\210\325\304\326\327#\207" [require w3m-util w3m-proc custom-declare-variable w3m-imagick-convert-program funcall function #[0 "\300\301!\207" [w3m-which-command "convert"] 2] "Program name of ImageMagick's `convert'." :group w3m :type (file :match (lambda (_widget value) (or (not value) (stringp value))) :value-to-internal (lambda (_widget value) (or value "nil")) :value-to-external (lambda (_widget value) (unless (equal value "nil") value))) w3m-imagick-identify-program #[0 "\300\301!\207" [w3m-which-command "identify"] 2] "Program name of ImageMagick's `identify'." (file :match (lambda (_widget value) (or (not value) (stringp value))) :value-to-internal (lambda (_widget value) (or value "nil")) :value-to-external (lambda (_widget value) (unless (equal value "nil") value))) w3m-resize-images #[0 "\205\301\207" [w3m-imagick-convert-program t] 1] "If non-nil, resize images to the specified width and height." boolean put available-p unknown] 8) #@150 Return non-nil if ImageMagick's `convert' program is available. If not, `w3m-imagick-convert-program' and `w3m-resize-images' are made nil forcibly. (defalias 'w3m-imagick-convert-program-available-p #[0 "\203\303\207\301\304N\305=\203\306\207\301\304N\307=\203\303\207 ;\203d\310 !\203d\311\301\304\305#\210\311\301\312\313\314\306\"r\211q\210\315\316\"\216\317\303!\210\320c\210\3211V\322ed \306\211\303\323\324&0\210\202W\210eb\210\325\326!*\262#\210\306\207 \203p\327\330!\210\331\332!\210\303\211\311\301\304\307#\210\303\207" [noninteractive w3m-imagick-convert-program w3m-resize-images nil available-p yes t no file-executable-p put png32 generate-new-buffer " *temp*" make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] set-buffer-multibyte "P1 1 1 1" (error) call-process-region "pbm:-" "png32:-" looking-at "\211PNG \n" message "ImageMagick's `convert' program is not available" sit-for 1] 14 (#$ . 1227)]) #@37 (fn FROM-TYPE TO-TYPE &rest ARGS) (defalias 'w3m-imagick-convert-buffer #[642 "\306 \205\201\307\310\311\"!\312\211\312\211\312B\313 B\314\315ed\314\316%\210\317 \210\320\321\314\322\314\323 \f\2058\f\324P\nP\f\203X\f\325\230\203Q\326\327N\203Q\330\202Y\f\331P\202Y\332D\"&\262\333!\203i\334!\210\211\247\203x\211\335U\203x\322\202~\336\337\"\210\314-\266\202\207" [w3m-profile-directory buffer-file-coding-system coding-system-for-read coding-system-for-write default-process-coding-system process-environment w3m-imagick-convert-program-available-p make-temp-name expand-file-name "w3mel" binary "LC_ALL=C" nil write-region nomsg erase-buffer apply call-process t append ":" "png" w3m-imagick-convert-program png32 "png32:-" ":-" "-" file-exists-p delete-file 0 message "Image conversion failed (code `%s')"] 17 (#$ . 2196)]) #@42 (fn DATA FROM-TYPE TO-TYPE &rest ARGS) (defalias 'w3m-imagick-convert-data #[899 "\300\301\302\"r\211q\210\303\304\"\216\305\306!\210c\210\307\310$\205'\311 \312U?\205'\313 *\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] set-buffer-multibyte nil apply w3m-imagick-convert-buffer buffer-size 0 buffer-string] 10 (#$ . 3064)]) #@50 (fn HANDLER DATA FROM-TYPE TO-TYPE &rest ARGS) (defalias 'w3m-imagick-start-convert-data #[1156 "\301\302!!p\303\304\"\303\305#\nBBrq\210\306 \2050\307\310!\210c\210\311\312\n\n\n%)\262\313!\203C \203?\207\314!\207\313r B!\262)\211\262!\203` \203\\\207\314!\207!\207" [w3m-work-buffer-name w3m-get-buffer-create generate-new-buffer-name make-closure #[257 "\301\300!\203 \300q\210\211\205\302 \303U?\205\304 \207" [V0 buffer-name buffer-size 0 buffer-string] 3 "\n\n(fn SUCCESS)"] #[257 "\302\300!\210\303\301!\203 \301q\210\207" [V0 V1 w3m-kill-buffer buffer-name] 3 "\n\n(fn SUCCESS)"] w3m-imagick-convert-program-available-p set-buffer-multibyte nil apply w3m-imagick-start-convert-buffer w3m-process-p w3m-process-start-process] 16 (#$ . 3476)]) #@45 (fn HANDLER FROM-TYPE TO-TYPE &rest ARGS) (defalias 'w3m-imagick-start-convert-buffer #[899 "\306\307\310\"!p\311\312\211\313\211\314ed\313\315%\210,\316\317\"\211Brq\210\320 \210\321\322 \2059 \323P P \203Y \324\230\203R\325\326N\203R\327\202Z \330P\202Z\331D\"#)\262\332!\203p\203l\207\333!\207\332!\211\262!\203\205\203\201\207\333!\207\207" [w3m-profile-directory w3m-current-url format-alist jka-compr-compression-info-list buffer-file-coding-system coding-system-for-write make-temp-name expand-file-name "w3mel" "non-existent" binary nil write-region nomsg make-closure #[257 "\301\300!\203\n\302\300!\210\207" [V0 file-exists-p delete-file] 3 "\n\n(fn SUCCESS)"] erase-buffer w3m-process-start append ":" "png" w3m-imagick-convert-program png32 "png32:-" ":-" "-" w3m-process-p w3m-process-start-process] 16 (#$ . 4273)]) #@156 Resize image DATA to WIDTH and HEIGHT asynchronously. HANDLER is called after conversion with resized data as an argument. (fn DATA WIDTH HEIGHT HANDLER) (defalias 'w3m-resize-image #[1028 "\300\211B\301\302\211\303\304 !\305\304\f!\306R&\262\307!\203)\203%\207\310!\207\307!\211\262!\203=\2039\207\310!\207\207" [#[257 "\207" [] 2 "\n\n(fn RESULT)"] w3m-imagick-start-convert-data nil "-geometry" number-to-string "x" "!" w3m-process-p w3m-process-start-process] 16 (#$ . 5156)]) #@225 Resize image DATA at RATE asynchronously. HANDLER is called after conversion with resized data as an argument. Note that this function requires that the `convert' program allows the `-resize' option. (fn DATA RATE HANDLER) (defalias 'w3m-resize-image-by-rate #[771 "\300\211B\301\302\211\303\304\n!\305P&\262\306!\203$\203 \207\307!\207\306!\211\262!\2038\2034\207\307!\207\207" [#[257 "\207" [] 2 "\n\n(fn RESULT)"] w3m-imagick-start-convert-data nil "-resize" number-to-string "%" w3m-process-p w3m-process-start-process] 13 (#$ . 5665)]) #@106 Check whether ImageMagick's `convert' supports a Windoze ico format in a large number of bits per pixel. (defalias 'w3m-favicon-usable-p #[0 "\3001Y\301\302\303\211\304\303\304\303\305\304\303\211\304\303\306\303\307\303\211\211\310\303\211\211\311\303\211\211\305\303\211\211\305\303\211\211\304\303\306\303\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\312\211\211\303\211\211\211\211\211&J\313\314#0\202[\210\315\211\205g\316\317\"\205g\320\207" [(error) w3m-imagick-convert-data string 0 1 2 24 52 22 40 255 "ico" "xpm" nil string-match "\" *2 +1 +2 +1 *\"" t] 76 (#$ . 6233)]) (provide 'w3m-image)