emacs-devel
[Top][All Lists]
Advanced

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

Re: imagemagick format detection code


From: Lars Magne Ingebrigtsen
Subject: Re: imagemagick format detection code
Date: Mon, 12 Aug 2013 17:17:39 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> and feed that into `create-image' (er...  ":guessed-suffix"?) and then
>> set it with that function.
>
> :guessed-suffix sounds like a hack.  Maybe a :format argument would be
> better (and the ImageMagick could turn it into a file suffix).

Or we could explicit and call it :content-type, since that's what it
is.  But that may lead callers to expect that it (always) be heeded
instead of treating it as a hint.  Uhm...  :content-type-hint?

And then, as you say, the ImageMagick code in image.c will do the right
thing.

For instance, have an alist where the initial population is just

'(("image/x-icon" "ico"))

and we'd set the file name to (say) "/tmp/foo.ico" before asking
ImageMagick to parse the data blob.

If this doesn't seem too gruesome, I can implement this, and we'll see
whether there are further elements that should be added after a while...

> We currently have a bit of a mess wrt to use of "format" and "type"
> since they're both used currently to refer to the same thing, which is
> not really the type or format of the image but rather something like the
> rendering library used.

Yes.  This will add to the general confusion in this area.

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