mirror of https://github.com/davisking/dlib.git
Minor change to avoid a compiler warning in gcc
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403982
This commit is contained in:
parent
c560f60479
commit
d89dbfa333
|
@ -639,14 +639,18 @@ namespace dlib
|
||||||
// dest += (src - dest)*(alpha/255);
|
// dest += (src - dest)*(alpha/255);
|
||||||
|
|
||||||
int temp = avg;
|
int temp = avg;
|
||||||
|
// copy dest into dest_copy using assign_pixel to avoid potential
|
||||||
|
// warnings about implicit float to int warnings.
|
||||||
|
int dest_copy;
|
||||||
|
assign_pixel(dest_copy, dest);
|
||||||
|
|
||||||
temp -= dest;
|
temp -= dest_copy;
|
||||||
|
|
||||||
temp *= src.alpha;
|
temp *= src.alpha;
|
||||||
|
|
||||||
temp /= 255;
|
temp /= 255;
|
||||||
|
|
||||||
assign_pixel(dest, temp+dest);
|
assign_pixel(dest, temp+dest_copy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue