[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

imagemagick format detection code

From: Lars Magne Ingebrigtsen
Subject: imagemagick format detection code
Date: Sun, 11 Aug 2013 23:14:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

duckduckgo outputs images as gzipped .ico files, and eww can now almost
display them.  But!  If I create the image from the data in the buffer,
I just get a square which imagemagick uses to tell us "nuh-huh; don't

  (set-buffer-multibyte nil)
  (insert-file-contents-literally "/tmp/b.ico")
  (let ((image (create-image (buffer-string) 'imagemagick t)))
    (pop-to-buffer "*image*")
    (insert-image image "*")))

However, if I create the image with

(create-image "/tmp/b.ico" 'imagemagick)

then it works fine.

Does anybody have any, er, insights to offer here?

(domestic pets only, the antidote for overdose, milk.)
  No Gnus T-Shirt for sale: http://ingebrigtsen.no/no.php
  and http://lars.ingebrigtsen.no/2013/08/twenty-years-of-september.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]