docs: protected void doFilterImpl(final ServletRequest pRequest, final ServletResponse pResponse, final FilterChain pChain)
              throws IOException, ServletException {
  
          //System.out.println("Starting filtering...");
          // Test for trigger params
          if (!trigger(pRequest)) {
              //System.out.println("Passing request on to next in chain (skipping " + getFilterName() + ")...");
              // Pass the request on
              pChain.doFilter(pRequest, pResponse);
          }
          else {
              // If already wrapped, the image will be encoded later in the chain
              // Or, if this is first filter in chain, we must encode when done
              boolean encode = !(pResponse instanceof ImageServletResponse);
  
              // For images, we do post filtering only and need to wrap the response
              ImageServletResponse imageResponse = createImageServletResponse(pRequest, pResponse);
  
              //System.out.println("Passing request on to next in chain...");
              // Pass the request on
              pChain.doFilter(pRequest, imageResponse);
  
              //System.out.println("Post filtering...");
  
              // Get image
              //System.out.println("Getting image from ImageServletResponse...");
              // Get the image from the wrapped response
              RenderedImage image = imageResponse.getImage();
              //System.out.println("Got image: " + image);
  
              // Note: Image will be null if this is a HEAD request, the
              // If-Modified-Since header is present, or similar.
              if (image != null) {
                  // Do the image filtering
                  //System.out.println("Filtering image (" + getFilterName() + ")...");
                  image = doFilter(ImageUtil.toBuffered(image), pRequest, imageResponse);
                  //System.out.println("Done filtering.");
  
                  //System.out.println("Making image available...");
                  // Make image available to other filters (avoid unnecessary serializing/deserializing)
                  imageResponse.setImage(image);
                  //System.out.println("Done.");
              }
              if (encode) {
                  //System.out.println("Encoding image...");
                  // Encode image to original response
                  if (image != null) {
                      // TODO: Be smarter than this...
                      // TODO: Make sure ETag is same, if image content is the same...
                      // Use ETag of original response (or derived from)
                      // Use last modified of original response? Or keep original resource's, don't set at all?
                      // TODO: Why weak ETag?
                      String etag = "W/\"" + Integer.toHexString(hashCode()) + "-" + Integer.toHexString(image.hashCode()) + "\"";
                      // TODO: This breaks for wrapped instances, need to either unwrap or test for HttpSR...
                      ((HttpServletResponse) pResponse).setHeader("ETag", etag);
                      ((HttpServletResponse) pResponse).setDateHeader("Last-Modified", (System.currentTimeMillis() / 1000) * 1000);
                  }
  
                  imageResponse.flush();
                  //System.out.println("Done encoding.");
              }
          }
          //System.out.println("Filtering done.");
      }