- (call-process shell-file-name nil nil nil "-c" command)))
-
-(defun thumbs-increment-image-size-element (n d)
- "Increment number N by D percent."
- (round (+ n (/ (* d n) 100))))
-
-(defun thumbs-decrement-image-size-element (n d)
- "Decrement number N by D percent."
- (round (- n (/ (* d n) 100))))
-
-(defun thumbs-increment-image-size (s)
- "Increment S (a cons of width x height)."
- (cons
- (thumbs-increment-image-size-element (car s)
- thumbs-image-resizing-step)
- (thumbs-increment-image-size-element (cdr s)
- thumbs-image-resizing-step)))
-
-(defun thumbs-decrement-image-size (s)
- "Decrement S (a cons of width x height)."
- (cons
- (thumbs-decrement-image-size-element (car s)
- thumbs-image-resizing-step)
- (thumbs-decrement-image-size-element (cdr s)
- thumbs-image-resizing-step)))
-
-(defun thumbs-resize-image (&optional increment size)
+ (call-process shell-file-name nil nil nil shell-command-switch command)))
+
+(defun thumbs-new-image-size (s increment)
+ "New image (a cons of width x height)."
+ (let ((d (* increment thumbs-image-resizing-step)))
+ (cons
+ (round (+ (car s) (/ (* d (car s)) 100)))
+ (round (+ (cdr s) (/ (* d (cdr s)) 100))))))
+
+(defun thumbs-resize-image-1 (&optional increment size)