From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.devel Subject: Re: A few issues with thumbs.el Date: Tue, 14 Jun 2005 14:53:31 +0200 Message-ID: References: <87br6zuerw.fsf-monnier+emacs@gnu.org> <87u0kqrsur.fsf-monnier+emacs@gnu.org> <87hdgon2p2.fsf@jurta.org> <87vf508myc.fsf-monnier+emacs@gnu.org> <87oeabsw97.fsf@rocksteady.printf.se> <87slzm26vw.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118754199 23194 80.91.229.2 (14 Jun 2005 13:03:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Jun 2005 13:03:19 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 14 15:03:12 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DiB3l-0002Jp-B1 for ged-emacs-devel@m.gmane.org; Tue, 14 Jun 2005 15:02:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DiB8l-00074a-DH for ged-emacs-devel@m.gmane.org; Tue, 14 Jun 2005 09:07:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DiB4v-0004mK-Kc for emacs-devel@gnu.org; Tue, 14 Jun 2005 09:03:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DiB4n-0004jr-2t for emacs-devel@gnu.org; Tue, 14 Jun 2005 09:03:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DiB4k-0004X3-Nj for emacs-devel@gnu.org; Tue, 14 Jun 2005 09:03:30 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DiAxw-0005l2-Q3 for emacs-devel@gnu.org; Tue, 14 Jun 2005 08:56:29 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DiAqb-0000CP-IC for emacs-devel@gnu.org; Tue, 14 Jun 2005 14:48:53 +0200 Original-Received: from user.ifsab.se ([193.41.170.225]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Jun 2005 14:48:53 +0200 Original-Received: from brakjoller by user.ifsab.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Jun 2005 14:48:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 48 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: user.ifsab.se User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:hwBQOgbXl+fdZIOCnZW/yZTj19E= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38806 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38806 Mathias Dahl writes: >> The above-mentioned specification is well thought out, and the list >> of advantages of this approach is convincing. So the best thing for >> us to do now is just to follow this standard and to share the same >> standard thumbnail directory with other GNU programs. > > Point taken. I will put this on my todo-list for tumme.el. It should > not be that hard to implement. I did some investigations yesterday and found that there is something I'm not sure how we could solve in a good way in Emacs: the tEXt chunks (text annotations) in PNG files. The ImageMagick package contains a utility called `identify' that can read these values in the following way: $ identify -verbose my_file.png | grep Thumb:: So, as both tumme.el and thumbs.el already use ImageMagick, although only the convert and mogrify tools (tumme.el could use only convert too if I wanted it too, but mogrify simplifies things a bit), I see no problem in how to read those annotations. The problem is writing them. After searching the net for a while I have found two ways to do it, using external tools: * pngcrush - a command line tool for compressing PNG to make them smaller, but which also can add tEXt chunks to PNG files. * a small perl-script, png-tEXt.pl, which sole purpose is to add text annotations to PNG files. I'm not sure about the licence for them, but they seem free enough (at least gratis) for use to use them. What I do not like is involving yet another utility and I have therefore a question: Would it be possible to (and would we want to, Emacs is after all mostly a text-processing tool, not a image manipulation app), in the long run, learn Emacs to read and write these annotations? If I understand it correctly pngcrush uses libpng, and that is what Emacs uses too, right? The subject of thumbnails seems to be sensitive, so I'll concentrate on fixing other things in tumme.el, in the meantime... :)