From: Han-Wen Nienhuys Date: Wed, 20 Dec 2006 13:50:11 +0000 (+0100) Subject: put pbm call in subroutine. X-Git-Tag: release/2.11.4-1~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2c88495cf3709ad5905a1af125a809b61525f08b;p=lilypond.git put pbm call in subroutine. --- diff --git a/scm/ps-to-png.scm b/scm/ps-to-png.scm index 4f6d322e48..9959afdbfe 100644 --- a/scm/ps-to-png.scm +++ b/scm/ps-to-png.scm @@ -90,16 +90,19 @@ status) (define (scale-down-image be-verbose factor file) - (let* ((status 0) - (old (string-append file ".old"))) - - (rename-file file old) - (my-system - be-verbose #t - (format #f - "pngtopnm ~a | pnmscale -reduce ~a 2>/dev/null | pnmtopng -compression 9 2>/dev/null > ~a" - old factor file)) - (delete-file old))) + (define (with-pbm) + (let* ((status 0) + (old (string-append file ".old"))) + + (rename-file file old) + (my-system + be-verbose #t + (format #f + "pngtopnm ~a | pnmscale -reduce ~a 2>/dev/null | pnmtopng -compression 9 2>/dev/null > ~a" + old factor file)) + (delete-file old))) + + (with-pbm)) (define-public (ps-page-count ps-name) (let* ((byte-count 10240)