Commit 98602c33 authored by Davis King's avatar Davis King

Fixed a color space handling bug in resize_image()

parent d75e747a
...@@ -571,7 +571,7 @@ namespace dlib ...@@ -571,7 +571,7 @@ namespace dlib
const long bottom = std::min(top+1, in_img.nr()-1); const long bottom = std::min(top+1, in_img.nr()-1);
const double tb_frac = y - top; const double tb_frac = y - top;
double x = -x_scale; double x = -x_scale;
if (!pixel_traits<U>::rgb) if (pixel_traits<U>::grayscale)
{ {
for (long c = 0; c < out_img.nc(); ++c) for (long c = 0; c < out_img.nc(); ++c)
{ {
......
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