private int verySlowFilter(Raster src, WritableRaster dst) {
        int numBands = src.getNumBands();

        int srcMinX = src.getMinX();
        int srcY = src.getMinY();

        int dstMinX = dst.getMinX();
        int dstY = dst.getMinY();

        int dX = src.getWidth();//< dst.getWidth() ? src.getWidth() : dst.getWidth();
        int dY = src.getHeight();//< dst.getHeight() ? src.getHeight() : dst.getHeight();

        float sample;
        int srcPixels[] = new int[numBands*dX*dY];
        int dstPixels[] = new int[mxHeight*dX*dY];

        srcPixels = src.getPixels(srcMinX, srcY, dX, dY, srcPixels);

        if (numBands == mxWidth) {
            for (int i=0, j=0; i<srcPixels.length; i+=numBands) {
                for (int dstB = 0; dstB < mxHeight; dstB++) {
                    sample = 0f;
                    for (int srcB = 0; srcB < numBands; srcB++) {
                        sample += matrix[dstB][srcB] * srcPixels[i+srcB];
                    }
                    dstPixels[j++] = (int) sample;
                }
            }
        } else {
            for (int i=0, j=0; i<srcPixels.length; i+=numBands) {
                for (int dstB = 0; dstB < mxHeight; dstB++) {
                    sample = 0f;
                    for (int srcB = 0; srcB < numBands; srcB++) {
                        sample += matrix[dstB][srcB] * srcPixels[i+srcB];
                    }
                    dstPixels[j++] = (int) (sample + matrix[dstB][numBands]);
                }
            }
        }

        dst.setPixels(dstMinX, dstY, dX, dY, dstPixels);

        return 0;
    }