Hereafter is a simple usage of this procedure:
(require "image") (require "pixmap") (define img1 (make-image "a pixmap" :file "exit.xpm")) (define img2 (make-image "a bitmap" :file "default.xbm")) (define img3 (make-image "a pixmap")) (define img4 (make-image "x.xpm"))In this case, img3 is identical to img1 since they use the same key. Img4 is the image associated to the file "x.xpm" found according to the *image-path* varaiable.
find-image returns the image associated to the given key or #f if this image has not been loaded yet.
change-image changes the content of an image previously created with make-image. Options are the identical to make-image options.
Example:
(button '.b1 :image img1) (button '.b2 :image img2) (button '.b3 :image img1) ; .b3 content is identical to .b1 (pack .b1 .b2 .b3) (change-image "a pixmap" :file "default.xbm")After the execution of change-image, both .b1 and .b3 graphical contents are changed.
delete-image removes the image with the given key of the cache. The memory used by this image is returned to the system. See the discussion about how this image is displayed in image delete.