dest-dir)))))
(defun album-convert-image (dest-dir prev-file file next-file)
+ (setq file (expand-file-name file))
(let* ((ret
(with-temp-buffer
(call-process "identify" nil t t file)
(expand-file-name "fullsize" dest-dir))
(make-directory
(expand-file-name "fullsize" dest-dir)))
- (call-process "convert" nil nil nil
- file
- (expand-file-name
- (concat
- (file-name-sans-extension
- (file-name-nondirectory file)) ".jpg")
- (expand-file-name "fullsize" dest-dir)))
+ (if (string= (downcase (file-name-extension file))
+ "jpg")
+ (call-process "ln" nil nil nil
+ "-f"
+ file
+ (expand-file-name "fullsize" dest-dir))
+ (call-process "convert" nil nil nil
+ file
+ (expand-file-name
+ (concat
+ (file-name-sans-extension
+ (file-name-nondirectory file)) ".jpg")
+ (expand-file-name "fullsize" dest-dir))))
dest))
(defun album-convert-images (dest-dir &rest source-images)
(setq files
(append files
(directory-files source-dir 'full pat))))
- (setq files (directory-files source-dir 'full)))
+ (setq files
+ (let (case-fold-search)
+ (directory-files
+ source-dir 'full
+ ".+\\.\\(tiff\\|jpg\\|JPG\\|jpeg\\|gif\\|png\\)$"))))
(album-convert-images dest-dir files)))