tiff-java icon indicating copy to clipboard operation
tiff-java copied to clipboard

Caused by: mil.nga.tiff.util.TiffException: Unsupported field type for sample format: 3, bits per sample: 8

Open AnkitDev21 opened this issue 2 years ago • 0 comments

Please fill out as much known and relevant information as possible.

Version Information:

  • TIFF Java Version:
  • TIFF Java Source: (e.g. Central Repository, Release, Source Code Build)
  • IDE Name & Version:
  • Maven Version: (mvn -version)
  • Java Version: (java -version)
  • Platform & OS:
  • Other Relevant Libraries:

Expected Results:

  • What did you expect to happen?

Observed Results:

  • What happened instead?
  • How often does this occur?

Output:

Caused by: mil.nga.tiff.util.TiffException: Unsupported field type for sample format: 3, bits per sample: 8

  • Any logs, errors, or output messages?
  • Caused by: mil.nga.tiff.util.TiffException: Unsupported field type for sample format: 3, bits per sample: 8

Steps to Reproduce:

  1. Step One
  2. Step Two
  3. ...

Relevant Code:

// Code to reproduce the problem?
InputStream inputStream = getApplicationContext().getResources().openRawResource(R.raw.cit);


    TIFFImage tiffImage = null;
    try {
        tiffImage = TiffReader.readTiff(inputStream);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
    List<FileDirectory> directories = tiffImage.getFileDirectories();
    FileDirectory directory = directories.get(0);
    Rasters rasters = directory.readRasters();
    Log.d(TAG, "onCreate: " + rasters);

Test Files:

  • Links to any files needed for testing?

Additional Information:

  • Any additional configuration, data, or information that might help with the issue?

AnkitDev21 avatar Jul 18 '23 05:07 AnkitDev21