X-Git-Url: http://uxul.de/gitweb/?p=uxul-world.git;a=blobdiff_plain;f=leveleditor.lisp;fp=leveleditor.lisp;h=44273964d54055fc568cd5f39b054dbf847bfc7b;hp=0f01e4009c4843eff3d75c80e2dd99c1e7e8228c;hb=3513580fa41deb8023977f77e64997708ff26455;hpb=3a5b6fe5b066ace9e3d03ec20c96c224cdbeb0b8 diff --git a/leveleditor.lisp b/leveleditor.lisp index 0f01e40..4427396 100755 --- a/leveleditor.lisp +++ b/leveleditor.lisp @@ -5,26 +5,28 @@ (defparameter *leveleditor-images* nil) (defun stretched-image (img) - "Call ImageMagick to resize that file to 32x32." - (lisp-magick:with-magick-wand (mywand) - (lisp-magick::magick-read-image-blob mywand img) - (lisp-magick::magick-resize-image mywand 32 32 #x00000000 1d0) - (lisp-magick::magick-set-format mywand "gif") - (lisp-magick::magick-get-image-blob mywand))) + "Resize that file to 32x32 and convert it into a ppm." + ;; HAAAAAAAAAAAACK + (map '(vector (unsigned-byte 8)) #'char-code + (resized (resize-bmp-blob img 32 32)))) (defun annotated-image (img ann) "Add a (lower-left) annotation." - (lisp-magick:with-magick-wand (mywand) - (lisp-magick::magick-read-image-blob mywand img) - (lisp-magick:with-drawing-wand (dw) - (lisp-magick:with-pixel-wand (pw :comp (255 255 255)) - (lisp-magick::draw-set-text-under-color dw pw)) - (lisp-magick:with-pixel-wand (pw :comp (255 0 0)) - (lisp-magick::draw-set-fill-color dw pw)) - (lisp-magick:draw-annotation dw (coerce 0 'double-float) (coerce 32 'double-float) ann) - (lisp-magick:magick-draw-image mywand dw)) - (lisp-magick::magick-set-format mywand "gif") - (lisp-magick::magick-get-image-blob mywand))) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;FIXME +img + +;; (lisp-magick:with-magick-wand (mywand) +;; (lisp-magick::magick-read-image-blob mywand img) +;; (lisp-magick:with-drawing-wand (dw) +;; (lisp-magick:with-pixel-wand (pw :comp (255 255 255)) +;; (lisp-magick::draw-set-text-under-color dw pw)) +;; (lisp-magick:with-pixel-wand (pw :comp (255 0 0)) +;; (lisp-magick::draw-set-fill-color dw pw)) +;; (lisp-magick:draw-annotation dw (coerce 0 'double-float) (coerce 32 'double-float) ann) +;; (lisp-magick:magick-draw-image mywand dw)) +;; (lisp-magick::magick-set-format mywand "gif") +;; (lisp-magick::magick-get-image-blob mywand))) +) (defun numbered-image (img num) "Annotate the image with a number."