Commit ebad74aa authored by sutr90's avatar sutr90

Fixed grayscale assignment.

parent 6e06fc87
...@@ -1262,8 +1262,8 @@ namespace dlib ...@@ -1262,8 +1262,8 @@ namespace dlib
typename enable_if_c<pixel_traits<P1>::lab>::type typename enable_if_c<pixel_traits<P1>::lab>::type
assign(P1& dest, const unsigned char& src) assign(P1& dest, const unsigned char& src)
{ {
dest.a = 0; dest.a = 128;
dest.b = 0; dest.b = 128;
dest.l = src; dest.l = src;
} }
...@@ -1272,8 +1272,8 @@ namespace dlib ...@@ -1272,8 +1272,8 @@ namespace dlib
typename enable_if_c<pixel_traits<P1>::lab && pixel_traits<P2>::grayscale>::type typename enable_if_c<pixel_traits<P1>::lab && pixel_traits<P2>::grayscale>::type
assign(P1& dest, const P2& src) assign(P1& dest, const P2& src)
{ {
dest.a = 0; dest.a = 128;
dest.b = 0; dest.b = 128;
assign_pixel(dest.l, src); assign_pixel(dest.l, src);
} }
......
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