code: public static float getJPEGQuality(final List<JPEGSegment> segments) throws IOException {
          int quality = getJPEGQuality(getQuantizationTables(segments));
          return quality >= 0 ? quality / 100f : quality;
      }
docs: Determines an approximate JPEG compression quality value from the quantization tables.
  The value will be in the range {@code [0...1]}, where {@code 1} is the best possible value.
  
  @param segments a list of JPEG segments containing the DQT quantization tables.
  @return a float in the range {@code [0...1]}, representing the JPEG quality,
  or {@code -1} if the quality can't be determined.
  @throws IIOException if a JPEG format error is found during parsing.
  @throws IOException if an I/O exception occurs during parsing.
  
  @see javax.imageio.plugins.jpeg.JPEGImageWriteParam#setCompressionQuality(float)
  @see JPEG#DQT