summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2001-08-17 20:34:01 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2001-08-17 20:34:01 (GMT)
commit365461a772b02c5e9be5ac30677b9c5dad93f61c (patch)
treebd22df45fa1d5d38cb6ea9a01a0b97ff3a2937e8 /tools
parent6218bc7efa1e7b8b9291f79e468aff9aa81b9398 (diff)
downloadhdf5-365461a772b02c5e9be5ac30677b9c5dad93f61c.zip
hdf5-365461a772b02c5e9be5ac30677b9c5dad93f61c.tar.gz
hdf5-365461a772b02c5e9be5ac30677b9c5dad93f61c.tar.bz2
[svn-r4370]
Purpose: 1. fix a bug 2. turn off a feature Description: 1. change the output of GRgetiminfo from NULL to &interlace_mode. 2. turn off the feature to change line-interleaved feature into pixel-interleaved feature since inconsistent behaviour is found in GR interface. Solution: see above Platforms tested: eirene, arabica
Diffstat (limited to 'tools')
-rw-r--r--tools/h4toh5/h4toh5image.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/tools/h4toh5/h4toh5image.c b/tools/h4toh5/h4toh5image.c
index 94fa08f..a1ab359 100644
--- a/tools/h4toh5/h4toh5image.c
+++ b/tools/h4toh5/h4toh5image.c
@@ -118,7 +118,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
}
istat = GRgetiminfo(ri_id, image_name, &ncomp, &image_dtype,
- NULL, dimsizes, &ngrattrs);
+ &interlace_mode, dimsizes, &ngrattrs);
if(istat == FAIL) {
printf("Cannot obtain GR info. at Image routine.\n");
@@ -154,7 +154,16 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
printf("error in allocating memory for image data. \n");
return FAIL;
}
-
+ /* GRreqimageil or GRreadimage are not working, comment this out for the time being.
+ if(interlace_mode == MFGR_INTERLACE_LINE){
+ istat = GRreqimageil(ri_id,MFGR_INTERLACE_PIXEL);
+ if(istat == FAIL){
+ printf("error in setting interlace_mode.\n");
+ free(image_data);
+ return FAIL;
+ }
+ }
+ */
istat = GRreadimage(ri_id, start, NULL, edges, (VOIDP)image_data);
if (istat == FAIL) {
@@ -179,13 +188,16 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in
h5dims24[1] = edges[0]-start[0];
h5dims24[2] = 3;
}
- /* currently scan-line is not supported.
+ /* currently scan-line is not supported. */
else if (interlace_mode == MFGR_INTERLACE_LINE){
- h5dims24[0] = 3;
+ printf("currently line interleaving is not supported.\n");
+ printf("the image %s will not be converted.\n",image_name);
+ free(image_data);
+ return SUCCEED;
+ /*h5dims24[0] = 3;
h5dims24[1] = edges[1]-start[1];
- h5dims24[2] = edges[0]-start[0];
+ h5dims24[2] = edges[0]-start[0];*/
}
- */
else if (interlace_mode == MFGR_INTERLACE_COMPONENT){
h5dims24[0] = 3;
h5dims24[1] = edges[1]-start[1];