@@ -237,6 +237,34 @@ def test_sys_clipboard(self):
237237 tcod .sys_clipboard_set ('' )
238238 tcod .sys_clipboard_get ()
239239
240+ def test_image (self ):
241+ img = tcod .image_new (16 , 16 )
242+ tcod .image_clear (img , (0 , 0 , 0 ))
243+ tcod .image_invert (img )
244+ tcod .image_hflip (img )
245+ tcod .image_rotate90 (img )
246+ tcod .image_vflip (img )
247+ tcod .image_scale (img , 24 , 24 )
248+ tcod .image_set_key_color (img , (255 , 255 , 255 ))
249+ tcod .image_get_alpha (img , 0 , 0 )
250+ tcod .image_is_pixel_transparent (img , 0 , 0 )
251+ tcod .image_get_size (img )
252+ tcod .image_get_pixel (img , 0 , 0 )
253+ tcod .image_get_mipmap_pixel (img , 0 , 0 , 1 , 1 )
254+ tcod .image_put_pixel (img , 0 , 0 , (255 , 255 , 255 ))
255+ tcod .image_blit (img , self .console , 0 , 0 , tcod .BKGND_SET , 1 , 1 , 0 )
256+ tcod .image_blit_rect (img , self .console , 0 , 0 , 16 , 16 , tcod .BKGND_SET )
257+ tcod .image_blit_2x (img , self .console , 0 , 0 )
258+ tcod .image_save (img , tempfile .mktemp (dir = self .temp_dir ))
259+ tcod .image_delete (img )
260+
261+ img = tcod .image_from_console (self .console )
262+ tcod .image_refresh_console (img , self .console )
263+ tcod .image_delete (img )
264+
265+ tcod .image_delete (tcod .image_load ('libtcod/data/img/circle.png' ))
266+
267+
240268class TestLibtcodpy (unittest .TestCase ):
241269 # arguments to test with and the results expected from these arguments
242270 LINE_ARGS = (- 5 , 0 , 5 , 10 )
0 commit comments