X-Git-Url: http://uxul.de/gitweb/?a=blobdiff_plain;f=files.lisp;h=0a880d1e24b0639e9d57cd6f3ab12bbfcbe76507;hb=470725f4a2f682d02fb15183cc596c7fa5c7b761;hp=07808be5357d76fd3e5b134c242122bbe529c332;hpb=32d336f81c7ba63968f935b66d6b601ecf9d400b;p=uxul-world.git diff --git a/files.lisp b/files.lisp index 07808be..0a880d1 100755 --- a/files.lisp +++ b/files.lisp @@ -18,24 +18,17 @@ (h (bmp-height img))) (uxul-world::resize-bmp-blob img (max 1 (floor (/ w a))) (max 1 (floor (/ h a)))))) -(defun all-sizes (img) - (list img - (ash-sized-image img 2) - (ash-sized-image img 4) - (ash-sized-image img 8))) - (defun init-bmp-file (file) "Load an image file into a Variable. Set |filename| (without .png and path) to a list with all sizes of that image." - (si (pathname-name file) - (all-sizes + (si (pathname-name file) (with-open-file (in file :element-type '(unsigned-byte 8)) (let* ((length (file-length in)) (content (make-array (list length) :element-type '(unsigned-byte 8) :adjustable nil))) (read-sequence content in) - content))))) + content)))) (defun bmp-p (file) "Is the file relevant for initialization? So far only .png-files are