Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23656e8 commit a0902feCopy full SHA for a0902fe
src/_image_resample.h
@@ -584,8 +584,8 @@ class lookup_distortion
584
if (dx >= 0 && dx < m_out_width &&
585
dy >= 0 && dy < m_out_height) {
586
const double *coord = m_mesh + (int(dy) * m_out_width + int(dx)) * 2;
587
- *x = int(coord[0] * agg::image_subpixel_scale);
588
- *y = int(coord[1] * agg::image_subpixel_scale);
+ *x = int(coord[0] * agg::image_subpixel_scale + 0.5); // round
+ *y = int(coord[1] * agg::image_subpixel_scale + 0.5); // round
589
}
590
591
0 commit comments