[Top][All Lists]

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

Mysterious gzipped images

From: Lars Magne Ingebrigtsen
Subject: Mysterious gzipped images
Date: Wed, 07 Aug 2013 00:20:16 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

I was looking at duckduckgo in eww, and I noticed that none of the
images displayed correctly in the search results.  And then I noticed
the following error message:

ImageMagick error: no decode delegate for this image format `' @ 
error/constitute.c/ReadImage/544 [3 times]

So.  Downloading one of the images:


address@hidden /tmp]$ curl -O https://icons.duckduckgo.com/i/a-z-animals.com.ico
address@hidden /tmp]$ file a-z-animals.com.ico 
a-z-animals.com.ico: gzip compressed data, max compression
address@hidden /tmp]$ mv a-z-animals.com.ico a-z-animals.com.ico.gz
address@hidden /tmp]$ gunzip a-z-animals.com.ico.gz 
address@hidden /tmp]$ file a-z-animals.com.ico   
a-z-animals.com.ico: MS Windows icon resource - 1 icon

So it's a gzipped image!  After unzipping Emacs understands it

Firefox does too, so I think Emacs should understand this weird method
of encoding images.  But how?  Should `create-image' see whether it
looks like a gzipped file before passing it on?  No, that's too grody.

Hm...  perhaps this is something that url.el should handle?  The HTTP
headers from the server says:

Content-Type: image/x-icon
Content-Encoding: gzip

So...  uhm...  should url undo the Content-Encoding before returning the

(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]