emacs-devel
[Top][All Lists]
Advanced

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

Re: A few issues with thumbs.el


From: Juanma Barranquero
Subject: Re: A few issues with thumbs.el
Date: Mon, 30 May 2005 12:03:56 +0200

> Even though I like when thumbnail file names are composed from file
> name parts (this allows to purge old thumbnails based on their names),
> this method is not reliable, because thumbnails don't get updated when
> image file contents changes.

You're right, the "correct" way would be to make an md5 or sha1 of the
file contents (not the filename) and add that to the thumbname.

> AFAIK, GIMP uses md5 for naming thumbnail files.  It stores original
> file names as comments in image files.  thumb.el could do the same
> adding comments with original file names, e.g.:

I'd like that, but the most prevalent opinion has been that people
wants to have the filename directly visible in the thumbname, so
that's what I've finally implemented.

> One solution is to add the geometry string to thumbnail file names, e.g.
> 
> /home/user/.emacs-thumbs/100x100_b765f25b9ed0233aaefcd601e63d6c86.png
> 
> or to add the original geometry string to the thumbnail file comments:
> 
> /usr/bin/convert -comment "Geometry: 100x100" ...

Comments would perhaps be better; adding more and more information to
the thumbnames makes them unwieldy. In fact, I've used a sxhash and
not md5 to make thumbnames more unique because they are already quite
large (as they include a slightly mangled full path).

-- 
                    /L/e/k/t/u




reply via email to

[Prev in Thread] Current Thread [Next in Thread]