summaryrefslogtreecommitdiffstats
path: root/tools/h4toh5image.c
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2001-02-16 03:35:37 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2001-02-16 03:35:37 (GMT)
commit5dc419551e3677f6b417ade268da3ee380245b75 (patch)
tree3e5ddb5d15da02e5b04cf0a1017f4d8beaa1f694 /tools/h4toh5image.c
parenta7c25153bc0b6077613307afd90b6b98c4ebb194 (diff)
downloadhdf5-5dc419551e3677f6b417ade268da3ee380245b75.zip
hdf5-5dc419551e3677f6b417ade268da3ee380245b75.tar.gz
hdf5-5dc419551e3677f6b417ade268da3ee380245b75.tar.bz2
[svn-r3415]
Purpose: bug fix Description: two bugs: 1. different order of conventions of sds and image in hdf4 is considered at h4toh5image.c file. add palette colormodel attribute and correct names of a few attributes. see detail at: http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageDetails.htm 2. convert hdf internal vdata structure(chunking table) into a new hdf5 dataset. Solution: 1. change h5 data space order for image. h5dims[0] = edge[1]-edge[0]; h5dims[1] = start[1]-start[0]; 2. at h4toh5main.c, check the vdata class name and if the first few characters match with HDF_CHK_TBL; ignore converting this vdata. 3. add a few attributes at h4toh5pal.c platforms: linux and sun 5.7(arabica) such as Big-endian-32bit (SUN/IRIX), little-endian-32(LINUX) and 64-bit (IRIX64/UNICOS/DEC-ALPHA) would be good.]
Diffstat (limited to 'tools/h4toh5image.c')
-rw-r--r--tools/h4toh5image.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/h4toh5image.c b/tools/h4toh5image.c
index c5bc1df..8fbbdc0 100644
--- a/tools/h4toh5image.c
+++ b/tools/h4toh5image.c
@@ -144,8 +144,14 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup) {
return FAIL;
}
- for (i=0;i<2;i++)
- h5dims[i] = edges[i]-start[i];
+ /* change the order of image dimension:
+ due to the difference of hdf4 image specification and
+ hdf5 image specification. */
+
+
+
+ h5dims[0] = edges[1]-start[1];
+ h5dims[1] = edges[0]-start[0];
gr_ref = GRidtoref(ri_id);
if(gr_ref == 0) {