public int[] getIntArrayValue() throws ImagingException {
        final Object o = getValue();
        // if (o == null)
        // return null;

        if (o instanceof Number) {
            return new int[] { ((Number) o).intValue() };
        }
        if (o instanceof Number[]) {
            final Number[] numbers = (Number[]) o;
            final int[] result = Allocator.intArray(numbers.length);
            Arrays.setAll(result, i -> numbers[i].intValue());
            return result;
        }
        if (o instanceof short[]) {
            final short[] numbers = (short[]) o;
            final int[] result = Allocator.intArray(numbers.length);
            Arrays.setAll(result, i -> 0xffff & numbers[i]);
            return result;
        }
        if (o instanceof int[]) {
            final int[] numbers = (int[]) o;
            return Arrays.copyOf(numbers, numbers.length);
        }
        if (o instanceof long[]) {
            final long[] numbers = (long[]) o;
            final int[] iNumbers = new int[numbers.length];
            for (int i = 0; i < iNumbers.length; i++) {
                iNumbers[i] = (int) numbers[i];
            }
            return iNumbers;
        }

        throw new ImagingException("Unknown value: " + o + " for: " + getTagInfo().getDescription());
        // return null;
    }
Returns the field's type, derived from bytes 2-3.

@return the field's type, as a {@code FieldType} object.
src/main/java/org/apache/commons/imaging/formats/tiff/TiffField.java