public WritableRaster filter(Raster src, WritableRaster dst) {
        int numBands = src.getNumBands();

        if (mxWidth != numBands && mxWidth != (numBands+1)) {
            // awt.254=Number of bands in the source raster ({0}) is
            //          incompatible with the matrix [{1}x{2}]
            throw new IllegalArgumentException(
                    Messages.getString("awt.254", //$NON-NLS-1$
                    new Object[]{numBands, mxWidth, mxHeight}));
        }

        if (dst == null) {
            dst = createCompatibleDestRaster(src);
        } else if (dst.getNumBands() != mxHeight) {
            // awt.255=Number of bands in the destination raster ({0}) is incompatible with the matrix [{1}x{2}]
            throw new IllegalArgumentException(Messages.getString("awt.255", //$NON-NLS-1$
                    new Object[]{dst.getNumBands(), mxWidth, mxHeight}));
        }

        // XXX - todo
        //if (ippFilter(src, dst) != 0)
        if (verySlowFilter(src, dst) != 0) {
            // awt.21F=Unable to transform source
            throw new ImagingOpException (Messages.getString("awt.21F")); //$NON-NLS-1$
        }

        return dst;
    }