; test program to see if there is a memory leak (module read-images (lib "scheme") (require mred) ;; gui suff (require srfi/48) ;; string format functions (require mzlib/list) (define (full-paths prefix path-list) (for/list ((p path-list)) (string-append prefix "/" (path->string p))) ) (define (image-path->bitmap-dc image-path) (new bitmap-dc% [bitmap (make-object bitmap% image-path)]) ) (define (load-image image-path) (let ((bitmap-dc (image-path->bitmap-dc image-path)) (colour (new color%))) (let-values (((width height) (send bitmap-dc get-size))) (display image-path) (display " (") (display width) (display "x") (display height) (display ")") (newline) (do ((x 0 (+ x 1))) ((= x width)) (do ((y 0 (+ y 1))) ((= y height)) (send bitmap-dc get-pixel x y colour) (list (send colour red) (send colour green) (send colour blue)) ) ) ) ) ) (if (not (= (vector-length (current-command-line-arguments)) 1)) (begin (display "needs 1 parameters") (newline) (exit 1)) (begin (display "starting...") (newline) ) ) (define source-images-path (vector-ref (current-command-line-arguments) 0)) (define image-names (directory-list source-images-path)) (for ((ip (quicksort (full-paths source-images-path image-names) (lambda (a b) (string