From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: imagemagick format detection code Date: Mon, 12 Aug 2013 17:17:39 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1376320691 17702 80.91.229.3 (12 Aug 2013 15:18:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Aug 2013 15:18:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 12 17:18:13 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V8tsq-0000qb-KZ for ged-emacs-devel@m.gmane.org; Mon, 12 Aug 2013 17:18:12 +0200 Original-Received: from localhost ([::1]:47696 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8tsq-0002ni-6L for ged-emacs-devel@m.gmane.org; Mon, 12 Aug 2013 11:18:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8tsh-0002nH-Sm for emacs-devel@gnu.org; Mon, 12 Aug 2013 11:18:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8tsc-0001tQ-Im for emacs-devel@gnu.org; Mon, 12 Aug 2013 11:18:03 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:58424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8tsc-0001sy-BP for emacs-devel@gnu.org; Mon, 12 Aug 2013 11:17:58 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1V8tsJ-0005tZ-UK; Mon, 12 Aug 2013 17:17:39 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWQop3n6dEhHBHFzLqB fmpTSzimt7EHe/J4AAACcklEQVQ4jW2UwXKjMAxAvVvDOR4o54zX3nM8TjhTKuVMPFbOZGj5/09Y ySTpTqfKgGI9JCwhWZmnRJbwXKluLbLEle3rUxa1Uz9K/QD1/COoN/9ZLlX+Sah6/UEYPF++6X67 B96VbDOa0NRFGxP6XyYG1ZSFMc09BVanGysGmyE5YR1ejPksCd4TffUZKH8ky6C9/gfaZD15awWY 6vYFdgJSsvZNnrp8AcM2ZAeLL8Z0+wdoFjNaS2z3ye/NyTFo2H5EezlxKPGwnkP+uXtAslO1AW8T /96aUDxOOeX7rpJAHQWEJrzm5JN15Fx53i38KVXHn7PLIyE52jsQrzcpkNotXJ1uJBgd/fWHRMne miVy2cWvtZSTeBw8Wh+4L1a1q+cl7ixQcglddGSnEONcq3aAIR40OE4w+VmTPcelF6BhAFDoSnIa k32PvTRDWxFh5ldbSQI41+uq9DColqNngNFzqSjxwmbIWAB/IISRMnEFBUwKYeBQgASEI2apxpUz P1dAcFYtjhaz5q0KmBhckSOAeLgZMeGUsvWDTRzYcxDVEg4woniA9eATcREyZgEKqBrRkUrEd0I/ kmaQcYYr/ubAK0fY57JbBh3UcbhUFQDEKsPEekJV7bkTg6nfjh8awGjI11rrieZqkhZt4q1fZz0Y pueo12HoP6/iIWyJXW24qC/NGvoYP96l27c+b1YT57iYXga4XwrYGp79DjwFsmBjAcewASO9JFfY QDyY78JgJ3PflGjhYSzgUMtk3uftcXKwqOOg6iV+l/VFHUHx3PIQxw0v5URRDAYZY+4LPhGWtUy5 nB7iAax7BfcToi52ff4H8zrYqQmQLegAAAAASUVORK5CYII= X-Now-Playing: Elvis Costello's _Armed Forces_: "Two Little Hitler's" X-Hashcash: 1:23:130812:emacs-devel@gnu.org::drxZw/9taW91sGeU:0000000000000000000000000000000000000000001nkn X-Hashcash: 1:23:130812:monnier@iro.umontreal.ca::Fcf6jRxlF0dIw/Wq:00000000000000000000000000000000000004Rk/ In-Reply-To: (Stefan Monnier's message of "Sun, 11 Aug 2013 21:06:13 -0400") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-MailScanner-ID: 1V8tsJ-0005tZ-UK MailScanner-NULL-Check: 1376925462.17792@e0hON/0ZH7Qt7lJOE0IJRg X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162616 Archived-At: Stefan Monnier 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