- (cond ((>= width height)
- (when (setq ret (album-make-spec-by-width width 2048 'QXGA))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-width width 1600 'UXGA))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-width width 1400 'SXGA+))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-width width 1280 'SXGA))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-width width 1024 'XGA))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-width width 800 'SVGA))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-width width 640 'VGA))
- (setq dest (cons ret dest)))
- )
- (t
- (when (setq ret (album-make-spec-by-height height 1536 'QXGA))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-height height 1200 'UXGA))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-height height 1050 'SXGA+))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-height height 960 'SXGA))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-height height 768 'XGA))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-height height 600 'SVGA))
- (setq dest (cons ret dest)))
- (when (setq ret (album-make-spec-by-height height 480 'VGA))
- (setq dest (cons ret dest)))
- ))
- (setq rest dest)
- (while rest
- (setq spec (car rest))
- (album-write-html dest-dir
- (if prev-file
- (file-name-sans-extension
- (file-name-nondirectory prev-file)))
- (file-name-sans-extension
- (file-name-nondirectory file))
- (if next-file
- (file-name-sans-extension
- (file-name-nondirectory next-file)))
- prev-grade
- (aref spec 1)
- (if (nth 1 rest)
- (aref (nth 1 rest) 1)))
- (call-process "convert" nil nil nil
- "-resize" (format "%d%%" (aref spec 0))
- file
- (expand-file-name
- (concat
- (file-name-sans-extension
- (file-name-nondirectory file)) ".jpg")
- (expand-file-name
- (symbol-name (aref spec 1))
- dest-dir)))
- (setq prev-grade (aref spec 1))
- (setq rest (cdr rest)))