docs: protected RenderedImage doFilter(BufferedImage pImage, ServletRequest pRequest, ImageServletResponse pResponse) throws IOException {
          if (pRequest instanceof HttpServletRequest) {
              HttpServletRequest request = (HttpServletRequest) pRequest;
  
              Map<String, Float> formatQuality = getFormatQualityMapping();
  
              // TODO: Consider adding original format, and use as fallback in worst case?
              // TODO: Original format should have some boost, to avoid unneccesary convertsion?
  
              // Update source quality settings from image properties
              adjustQualityFromImage(formatQuality, pImage);
              //System.out.println("Source quality mapping: " + formatQuality);
  
              adjustQualityFromAccept(formatQuality, request);
              //System.out.println("Final media scores: " + formatQuality);
  
              // Find the formats with the highest quality factor, and use the first (predictable)
              String acceptable = findBestFormat(formatQuality);
  
              //System.out.println("Acceptable: " + acceptable);
  
              // Send HTTP 406 Not Acceptable
              if (acceptable == null) {
                  if (pResponse instanceof HttpServletResponse) {
                      ((HttpServletResponse) pResponse).sendError(HttpURLConnection.HTTP_NOT_ACCEPTABLE);
                  }
                  return null;
              }
              else {
                  // TODO: Only if the format was changed!
                  // Let other filters/caches/proxies know we changed the image
              }
  
              // Set format
              pResponse.setOutputContentType(acceptable);
              //System.out.println("Set format: " + acceptable);
          }
  
          return pImage;
      }