[gegl] panorama-projection: fix off by half error in sampling
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] panorama-projection: fix off by half error in sampling
- Date: Mon, 9 Apr 2018 19:37:02 +0000 (UTC)
commit c87c5a3f3de514835330a7929479ba6b11fc32fd
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Apr 9 21:36:32 2018 +0200
panorama-projection: fix off by half error in sampling
operations/common/panorama-projection.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/operations/common/panorama-projection.c b/operations/common/panorama-projection.c
index f17b310..6cb6b95 100644
--- a/operations/common/panorama-projection.c
+++ b/operations/common/panorama-projection.c
@@ -477,7 +477,8 @@ process (GeglOperation *operation,
gegl_unmap(u,v, cx, cy);
#undef gegl_unmap
gegl_sampler_get (sampler,
- cx * transform.in_width, cy * transform.in_height,
+ cx * transform.in_width + 0.5f,
+ cy * transform.in_height + 0.5f,
scale, out, abyss_mode);
out += 4;
@@ -501,7 +502,8 @@ process (GeglOperation *operation,
transform.mapfun (&transform, u, v, &cx, &cy);
gegl_sampler_get (sampler,
- cx * transform.in_width, cy * transform.in_height,
+ cx * transform.in_width + 0.5f,
+ cy * transform.in_height + 0.5f,
scale, out, abyss_mode);
out += 4;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]