From 7dd5cd690e3c61df638aaacad5d23617f72ff0da Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 27 Feb 2011 20:34:44 +0100 Subject: Add clarifying comments --- src/hdf5-file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hdf5-file.c b/src/hdf5-file.c index de25d396..33d3f95a 100644 --- a/src/hdf5-file.c +++ b/src/hdf5-file.c @@ -229,6 +229,8 @@ int hdf5_write(const char *filename, const void *data, return 1; } + /* Note the "swap" here, according to section 3.2.5, + * "C versus Fortran Dataspaces", of the HDF5 user's guide. */ size[0] = height; size[1] = width; max_size[0] = height; @@ -396,8 +398,10 @@ int hdf5_read(struct hdfile *f, struct image *image, int satcorr, uint16_t *flags; hid_t mask_dh; + /* Note the "swap" here, according to section 3.2.5, + * "C versus Fortran Dataspaces", of the HDF5 user's guide. */ image->width = f->ny; - image->height = f->nx; /* Note axis swap */ + image->height = f->nx; buf = malloc(sizeof(float)*f->nx*f->ny); -- cgit v1.2.3