[giv] Fixed bug in the reading of multi slice fits files.



commit ded531d3152adb7e3afa9beee8298c481e60f405
Author: Dov Grobgeld <dov grobgeld gmail com>
Date:   Tue Sep 13 20:01:05 2011 +0300

    Fixed bug in the reading of multi slice fits files.

 ChangeLog          |    4 ++++
 src/plugins/fits.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 10b2673..aec7284 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-06  Dov Grobgeld  <dov grobgeld gmail com>
+
+        * plugins/fits.c : Fixed bug in the reading of multi slice fits files.
+
 2011-08-03  Dov Grobgeld  <dov grobgeld gmail com>
 
         * GivRenderer.cc, giv-data.h, giv-parser.cc : Got
diff --git a/src/plugins/fits.c b/src/plugins/fits.c
index 5ceea42..c70d413 100644
--- a/src/plugins/fits.c
+++ b/src/plugins/fits.c
@@ -130,7 +130,7 @@ GivImage *giv_plugin_load_file(const char *filename,
                               width,
                               width * wsize,
                               height,
-                              height * wsize * height,
+                              height * wsize * width,
                               2,
                               depth);
     wsize = giv_image_type_get_size(type)/8;  /* Size in bytes */
@@ -150,7 +150,7 @@ GivImage *giv_plugin_load_file(const char *filename,
             for (row_idx = 0; row_idx < height; row_idx++)
                 memcpy(img->buf.buf + z_idx * slice_size
                        + (height - row_idx - 1) * width * wsize,
-                       flip_data + z_idx * slice_size + row_idx * width * wsize,
+                       (guchar*)flip_data + z_idx * slice_size + row_idx * width * wsize,
                        width * wsize);
     }
 #else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]