| 2541 | } |
| 2542 | |
| 2543 | void test_draw_string() |
| 2544 | { |
| 2545 | print_spinner(); |
| 2546 | matrix<rgb_pixel> image{48, 48}; |
| 2547 | assign_all_pixels(image, rgb_pixel{0, 0, 0}); |
| 2548 | draw_string(image, point{10, 15}, string{"cat"}, rgb_pixel{255, 255, 255}); |
| 2549 | |
| 2550 | matrix<rgb_pixel> result; |
| 2551 | const std::string data{"gQgLudERwR0JqP9kUiitFNDYSO9rdZzdmeDmricAlM5f5RBqzTlaW6Lp704mTXJq/WXHTQ84wWnGAA=="}; |
| 2552 | ostringstream sout; |
| 2553 | istringstream sin; |
| 2554 | base64 base64_coder; |
| 2555 | compress_stream::kernel_1ea compressor; |
| 2556 | sin.str(data); |
| 2557 | base64_coder.decode(sin, sout); |
| 2558 | sin.clear(); |
| 2559 | sin.str(sout.str()); |
| 2560 | sout.clear(); |
| 2561 | sout.str(""); |
| 2562 | compressor.decompress(sin, sout); |
| 2563 | sin.clear(); |
| 2564 | sin.str(sout.str()); |
| 2565 | deserialize(result, sin); |
| 2566 | DLIB_TEST(image == result); |
| 2567 | } |
| 2568 | |
| 2569 | template <typename pixel_type> |
| 2570 | double avg_pixel_delta(const matrix<pixel_type>& img1, const matrix<pixel_type>& img2) |
no test coverage detected