Merge pull request #99 from dazoe/master

Fix loading images upside down when using dlib
This commit is contained in:
Vadim Lopatin 2015-11-02 09:16:12 +03:00
commit aaf4afd676
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ version (USE_DLIBIMAGE) {
for (int y = 0; y < h; y++) {
uint * dstLine = buf.scanLine(y);
for (int x = 0; x < w; x++) {
auto pixel = image[x, h - 1 - y].convert(8);
auto pixel = image[x, y].convert(8);
dstLine[x] = makeRGBA(pixel.r, pixel.g, pixel.b, 255 - pixel.a);
}
}