| 1727 | } |
| 1728 | |
| 1729 | void test_dng_float_int() |
| 1730 | { |
| 1731 | dlog << LINFO << "in test_dng_float_int"; |
| 1732 | print_spinner(); |
| 1733 | |
| 1734 | array2d<uint16> img; |
| 1735 | assign_image(img, gaussian_randm(101,100)*10000); |
| 1736 | |
| 1737 | ostringstream sout; |
| 1738 | save_dng(img, sout); |
| 1739 | istringstream sin(sout.str()); |
| 1740 | array2d<double> img2; |
| 1741 | load_dng(img2, sin); |
| 1742 | sout.clear(); sout.str(""); |
| 1743 | |
| 1744 | save_dng(img2, sout); |
| 1745 | sin.clear(); sin.str(sout.str()); |
| 1746 | array2d<uint16> img3; |
| 1747 | load_dng(img3, sin); |
| 1748 | |
| 1749 | // this whole thing should have been totally lossless. |
| 1750 | DLIB_TEST(mat(img) == mat(img3)); |
| 1751 | } |
| 1752 | |
| 1753 | // ---------------------------------------------------------------------------------------- |
| 1754 |
no test coverage detected