| 320 | #endif |
| 321 | |
| 322 | void set_size(long rows, long cols) |
| 323 | /*! |
| 324 | requires |
| 325 | - rows >= 0 && cols >= 0 |
| 326 | ensures |
| 327 | - Tells the underlying image to resize itself to have the given number of |
| 328 | rows and columns. |
| 329 | - #nr() == rows |
| 330 | - #nc() == cols |
| 331 | !*/ |
| 332 | { |
| 333 | DLIB_ASSERT((cols >= 0 && rows >= 0), |
| 334 | "\t image_view::set_size(long rows, long cols)" |
| 335 | << "\n\t The images can't have negative rows or columns." |
| 336 | << "\n\t cols: " << cols |
| 337 | << "\n\t rows: " << rows |
| 338 | ); |
| 339 | set_image_size(*_img, rows, cols); *this = *_img; |
| 340 | } |
| 341 | |
| 342 | void clear() { set_size(0,0); } |
| 343 | /*! |
no test coverage detected