Re: Displaying thumbnails of attached images?
Kazuhiro Ito <[email protected]> Tue, 21 Aug 2018 20:14:05 +0900
| Newsgroups | gmane.mail.wanderlust.general |
|---|---|
| Message-ID | <vriu4lfokm4i.wl--xmue__36409.0092633434$1534850040$gmane$org@d1.dion.ne.jp> |
Hi,
> Sometimes I get emails with image attachments (e.g., photos). WL
> displays the attachments in the original size (usually too big for
> the screen), and as far as I can tell there is no way to zoom out in
> the message buffer. I also don't seem to be able to navigate
> between the attachments when there are many images (the keybindings
> p and n do not work reliably), hence sometimes I can't even tell how
> many attachments the email contains. Does anyone have a better way
> to deal with image attachments?
If your Emacs has imagemagick support, override mime-display-image
with below and you can get thumbnailed image.
(defun mime-display-image (entity situation)
(message "Decoding image...")
(condition-case err
(let ((format (cdr (assq 'image-format situation)))
image)
(setq image
(mime-image-create (mime-entity-content entity)
'imagemagick 'data
:max-height 360
:max-width 240
))
(if (null image)
(message "Invalid glyph!")
(save-excursion
(mime-image-insert image)
(insert "\n")
(message "Decoding image...done"))))
(error
(message "%s" err))))
--
Kazuhiro Ito