| 1812 | } |
| 1813 | |
| 1814 | void test_dng_float_int() |
| 1815 | { |
| 1816 | dlog << LINFO << "in test_dng_float_int"; |
| 1817 | print_spinner(); |
| 1818 | |
| 1819 | array2d<uint16> img; |
| 1820 | assign_image(img, gaussian_randm(101,100)*10000); |
| 1821 | |
| 1822 | ostringstream sout; |
| 1823 | save_dng(img, sout); |
| 1824 | istringstream sin(sout.str()); |
| 1825 | array2d<double> img2; |
| 1826 | load_dng(img2, sin); |
| 1827 | sout.clear(); sout.str(""); |
| 1828 | |
| 1829 | save_dng(img2, sout); |
| 1830 | sin.clear(); sin.str(sout.str()); |
| 1831 | array2d<uint16> img3; |
| 1832 | load_dng(img3, sin); |
| 1833 | |
| 1834 | // this whole thing should have been totally lossless. |
| 1835 | DLIB_TEST(mat(img) == mat(img3)); |
| 1836 | } |
| 1837 | |
| 1838 | // ---------------------------------------------------------------------------------------- |
| 1839 |
no test coverage detected