1 USING: images.bitmap images.viewer io.encodings.binary
2 io.files io.files.unique kernel tools.test images.loader ;
3 IN: images.bitmap.tests
5 : test-bitmap24 ( -- path )
6 "vocab:images/test-images/thiswayup24.bmp" ;
8 : test-bitmap8 ( -- path )
9 "vocab:images/test-images/rgb8bit.bmp" ;
11 : test-bitmap4 ( -- path )
12 "vocab:images/test-images/rgb4bit.bmp" ;
14 : test-bitmap1 ( -- path )
15 "vocab:images/test-images/1bit.bmp" ;
20 [ binary file-contents ] [ load-image ] bi
22 "test-bitmap24" unique-file
23 [ save-bitmap ] [ binary file-contents ] bi =