docs: public final BufferedImage filter(BufferedImage pSource, BufferedImage pDest) {
          // Create destination image, if none provided
          if (pDest == null) {
              pDest = createCompatibleDestImage(pSource, getICM(pSource));
          }
          else if (!(pDest.getColorModel() instanceof IndexColorModel)) {
              throw new ImageFilterException("Only IndexColorModel allowed.");
          }
  
          // Filter rasters
          filter(pSource.getRaster(), pDest.getRaster(), (IndexColorModel) pDest.getColorModel());
  
          return pDest;
      }