docs: private static int getOrientationFromTiffEntry(InputStream is, int length, boolean isLittleEndian)
        throws IOException {
      if (length < 10) {
        return 0;
      }
      // orientation entry has type = short
      int type = StreamProcessor.readPackedInt(is, 2, isLittleEndian);
      if (type != TIFF_TYPE_SHORT) {
        return 0;
      }
      // orientation entry has count = 1
      int count = StreamProcessor.readPackedInt(is, 4, isLittleEndian);
      if (count != 1) {
        return 0;
      }
      int value = StreamProcessor.readPackedInt(is, 2, isLittleEndian);
      int padding = StreamProcessor.readPackedInt(is, 2, isLittleEndian);
      return value;
    }