diff --git a/jhove-bbt/scripts/create-1.30-target.sh b/jhove-bbt/scripts/create-1.30-target.sh index 0f7b94d28..46ed6dd84 100755 --- a/jhove-bbt/scripts/create-1.30-target.sh +++ b/jhove-bbt/scripts/create-1.30-target.sh @@ -114,6 +114,74 @@ if [[ -f "${candidateRoot}/regression/modules/PDF-hul/issue_306.pdf.jhove.xml" ] cp "${candidateRoot}/regression/modules/PDF-hul/issue_306.pdf.jhove.xml" "${targetRoot}/regression/modules/PDF-hul/issue_306.pdf.jhove.xml" fi +# Copy the TIFF Module results changed by https://github.com/openpreserve/jhove/pull/915 +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/AA_Banner.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/AA_Banner.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/AA_Banner.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/strike.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/strike.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/strike.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/testpage-large.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/testpage-large.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/testpage-large.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/testpage-medium.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/testpage-medium.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/testpage-medium.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/oxford.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/oxford.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/oxford.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/jim___gg.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/jim___gg.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/jim___gg.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/bathy1.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/bathy1.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/bathy1.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/jim___cg.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/jim___cg.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/jim___cg.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/quad-tile.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/quad-tile.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/quad-tile.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/compos.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/compos.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/compos.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/pagemaker.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/pagemaker.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/pagemaker.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/jello.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/jello.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/jello.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/little-endian.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/little-endian.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/little-endian.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/cramps-tile.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/cramps-tile.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/cramps-tile.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/jim___ah.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/jim___ah.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/jim___ah.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/g3test.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/g3test.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/g3test.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/6mp_soft.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/6mp_soft.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/6mp_soft.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/ycbcr-cat.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/ycbcr-cat.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/ycbcr-cat.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/quad-lzw.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/quad-lzw.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/quad-lzw.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/jim___dg.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/jim___dg.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/jim___dg.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/fax2d.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/fax2d.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/fax2d.tif.jhove.xml" +fi +if [[ -f "${candidateRoot}/examples/modules/TIFF-hul/peppers.tif.jhove.xml" ]]; then + cp "${candidateRoot}/examples/modules/TIFF-hul/peppers.tif.jhove.xml" "${targetRoot}/examples/modules/TIFF-hul/peppers.tif.jhove.xml" +fi + # Copy the PNG Module results changed by https://github.com/openpreserve/jhove/pull/843 if [[ -f "${candidateRoot}/regression/modules/PNG-gdm/issue_148.png.jhove.xml" ]]; then cp "${candidateRoot}/regression/modules/PNG-gdm/issue_148.png.jhove.xml" "${targetRoot}/regression/modules/PNG-gdm/issue_148.png.jhove.xml" diff --git a/jhove-modules/tiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/tiff/TiffIFD.java b/jhove-modules/tiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/tiff/TiffIFD.java index 908364613..5bc48e037 100644 --- a/jhove-modules/tiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/tiff/TiffIFD.java +++ b/jhove-modules/tiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/tiff/TiffIFD.java @@ -1131,6 +1131,8 @@ public Property getProperty(boolean rawOutput) throws TiffException { // This function has gotten obscenely large. Split it up. addNisoProperties(entries, rawOutput); addMiscProperties(entries, rawOutput); + // Add Strip and Tile information from NISO since not displayed in MIX v1.0+ + addNonDisplayedNisoProperties(entries, rawOutput); addTiffITProperties(entries, rawOutput); addTiffEPProperties(entries, rawOutput); addGeoTiffProperties(entries, rawOutput); @@ -1340,6 +1342,58 @@ private void addMiscProperties(List entries, boolean rawOutput) { } } + // Add Strip and Tile information from NISO since not displayed in v1.0 and subsequent + private void addNonDisplayedNisoProperties(List entries, boolean rawOutput) { + if (_niso == null) return; + + int segmentType = _niso.getSegmentType(); + if (segmentType != NULL) { + entries.add(new Property("SegmentType", PropertyType.INTEGER, + segmentType)); + } + long[] stripOffsets = _niso.getStripOffsets(); + if (stripOffsets != null) { + entries.add(new Property("StripOffsets", PropertyType.LONG, + PropertyArity.ARRAY, stripOffsets)); + } + long rowsPerStrip = _niso.getRowsPerStrip(); + if (rowsPerStrip != NULL) { + entries.add(new Property("RowsPerStrip", PropertyType.LONG, + rowsPerStrip)); + } + long[] stripByteCounts = _niso.getStripByteCounts(); + if (stripByteCounts != null) { + entries.add(new Property("StripByteCounts", PropertyType.LONG, + PropertyArity.ARRAY, stripByteCounts)); + } + + long tileWidth = _niso.getTileWidth(); + if (tileWidth != NULL) { + entries.add(new Property("TileWidth", PropertyType.LONG, + tileWidth)); + } + long tileLength = _niso.getTileLength(); + if (tileLength != NULL) { + entries.add(new Property("TileLength", PropertyType.LONG, + tileLength)); + } + long[] tileOffsets = _niso.getTileOffsets(); + if (tileOffsets != null) { + entries.add(new Property("TileOffsets", PropertyType.LONG, + PropertyArity.ARRAY, tileOffsets)); + } + long[] tileByteCounts = _niso.getTileByteCounts(); + if (tileByteCounts != null) { + entries.add(new Property("TileByteCounts", PropertyType.LONG, + PropertyArity.ARRAY, tileByteCounts)); + } + int planarConfiguration = _niso.getPlanarConfiguration(); + if (planarConfiguration != NULL) { + entries.add(new Property("PlanarConfiguration", PropertyType.INTEGER, + planarConfiguration)); + } + } + private void addTiffITProperties(List entries, boolean rawOutput) { /* Add TIFF/IT properties. */