Fixed grayscale assignment.

This commit is contained in:
sutr90 2016-07-27 17:47:42 +02:00
parent 6e06fc873c
commit ebad74aa20

View File

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