Commit 031bb7d0 authored by Davis King's avatar Davis King

Added a set_image_size() for sub_image_proxy objects so that they can be

written to with assign_image().  However, you get an error if you try to
assign an image with a different size.
parent 7dc61eaf
......@@ -120,6 +120,17 @@ namespace dlib
const const_sub_image_proxy<T>& img
) { return img._width_step; }
template <typename T>
void set_image_size(sub_image_proxy<T>& img, long rows, long cols)
{
DLIB_CASSERT(img._nr == rows && img._nc == cols, "A sub_image can't be resized."
<< "\n\t img._nr: "<< img._nr
<< "\n\t img._nc: "<< img._nc
<< "\n\t rows: "<< rows
<< "\n\t cols: "<< cols
);
}
template <
typename image_type
>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment