hdfview icon indicating copy to clipboard operation
hdfview copied to clipboard

TestHDFViewImageConversion: convertImageToHDF4 fails - HDF4 image conversion bug

Open byrnHDF opened this issue 1 month ago • 0 comments

Description

The convertImageToHDF4 test in TestHDFViewImageConversion fails when attempting to convert a JPEG image to HDF4 format. After conversion, the file tree shows 0 rows instead of the expected converted file.

Error Details

The row number (0) is more than the number of rows(0) in the tree.

Test Details

  • Test file: TestHDFViewImageConversion.java
  • Test method: convertImageToHDF4()
  • Input image: apollo17_earth.jpg
  • Expected output: apollo17_earth.jpg.hdf

Steps to Reproduce

  1. Run mvn test -pl hdfview -Dtest=TestHDFViewImageConversion#convertImageToHDF4
  2. Test opens Tools > Convert Image To > HDF4
  3. Conversion appears to complete but file tree is empty

Expected Behavior

  • Image should be converted to HDF4 format
  • Converted file should appear in the file tree
  • Image metadata (rank, dimensions) should be accessible

Workaround

Test is currently disabled with @Disabled annotation. The HDF5 image conversion test (convertImageToHDF5) works correctly.

Notes

This appears to be a bug in the HDF4 image conversion functionality, not just the test.

byrnHDF avatar Nov 21 '25 15:11 byrnHDF