From d2b04e5eb7807c36b86d7ae8be8c6b593996f12b Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sat, 28 Jan 2006 03:39:44 +0000
Subject: [PATCH] y off by one

---
 Graphics/ReadImg.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Graphics/ReadImg.cpp b/Graphics/ReadImg.cpp
index c762c70a09..50e1544d9f 100644
--- a/Graphics/ReadImg.cpp
+++ b/Graphics/ReadImg.cpp
@@ -1,4 +1,4 @@
-// $Id: ReadImg.cpp,v 1.11 2006-01-28 00:58:25 geuzaine Exp $
+// $Id: ReadImg.cpp,v 1.12 2006-01-28 03:39:44 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -56,11 +56,11 @@ Post_View * Img2Pos(Fl_RGB_Image & img_init, int quads=1,
   for(int i = 0; i < height - 1; i++) {
     const uchar *a = data + i * width * dim;
     const uchar *a1 = data + (i + 1) * width * dim;
-    double y = height - i;
-    double y1 = height - (i + 1);
+    double y = height - i - 1;
+    double y1 = height - i - 2;
     for(int j = 0; j < width - 1; j++) {
       double x = j;
-      double x1 = (j + 1);
+      double x1 = j + 1;
       double val1 = (double)a[j]/255.;
       double val2 = (double)a1[j]/255.;
       double val3 = (double)a1[j + 1]/255.;
-- 
GitLab