emacs-devel
[Top][All Lists]
Advanced

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

thumbs-image-type?


From: Bill Wohler
Subject: thumbs-image-type?
Date: Mon, 17 Oct 2005 16:53:34 -0700

It seems to me that the following should be renamed to image-type and
moved to image.el, or--probably better--calls to thumbs-image-type
should be replaced by image-type-from-file-header.

(defun thumbs-image-type (img)
  "Return image type from filename IMG."
  (cond ((string-match ".*\\.jpe?g\\'" img) 'jpeg)
        ((string-match ".*\\.xpm\\'" img) 'xpm)
        ((string-match ".*\\.xbm\\'" img) 'xbm)
        ((string-match ".*\\.gif\\'" img) 'gif)
        ((string-match ".*\\.bmp\\'" img) 'bmp)
        ((string-match ".*\\.png\\'" img) 'png)
        ((string-match ".*\\.tiff?\\'" img) 'tiff)))

-- 
Bill Wohler <address@hidden>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.




reply via email to

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