[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:
https://icons.duckduckgo.com/i/a-z-animals.com.ico
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
perfectly.
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.
Totally.
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
buffer?
--
(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
- Mysterious gzipped images,
Lars Magne Ingebrigtsen <=
- Re: Mysterious gzipped images, Lars Magne Ingebrigtsen, 2013/08/06
- Re: Mysterious gzipped images, Andreas Schwab, 2013/08/06
- Re: Mysterious gzipped images, Lars Magne Ingebrigtsen, 2013/08/06
- Re: Mysterious gzipped images, Lars Magne Ingebrigtsen, 2013/08/06
- Re: Mysterious gzipped images, Julien Danjou, 2013/08/07
- Re: Mysterious gzipped images, Stefan Monnier, 2013/08/07
- Re: Mysterious gzipped images, chad, 2013/08/07
- Re: Mysterious gzipped images, Lars Magne Ingebrigtsen, 2013/08/08
- Re: Mysterious gzipped images, Andreas Schwab, 2013/08/08
- Re: Mysterious gzipped images, Lars Magne Ingebrigtsen, 2013/08/11