protected void computeRect(Raster[] sources,
                               WritableRaster dest,
                               Rectangle destRect) {

        int formatTag = MediaLibAccessor.findCompatibleTag(sources,dest);

        MediaLibAccessor srcAccessor1 = 
            new MediaLibAccessor(sources[0], destRect,formatTag);
	MediaLibAccessor srcAccessor2 = 
	    new MediaLibAccessor(sources[1], destRect,formatTag);
        MediaLibAccessor dstAccessor = 
            new MediaLibAccessor(dest, destRect, formatTag);

        mediaLibImage[] srcML1 = srcAccessor1.getMediaLibImages();
        mediaLibImage[] srcML2 = srcAccessor2.getMediaLibImages();
        mediaLibImage[] dstML  = dstAccessor.getMediaLibImages();

        switch (dstAccessor.getDataType()) {
        case DataBuffer.TYPE_BYTE:
        case DataBuffer.TYPE_USHORT:
        case DataBuffer.TYPE_SHORT:
        case DataBuffer.TYPE_INT:
            for (int i = 0 ; i < dstML.length; i++) {
                Image.Sub(dstML[i], srcML1[i], srcML2[i]);
            }
            break;

        case DataBuffer.TYPE_FLOAT:
        case DataBuffer.TYPE_DOUBLE:
            for (int i = 0 ; i < dstML.length; i++) {
                Image.Sub_Fp(dstML[i], srcML1[i], srcML2[i]);
            }
            break;

        default:
            String className = this.getClass().getName();
            throw new RuntimeException(className + JaiI18N.getString("Generic2"));
        }

        if (dstAccessor.isDataCopy()) {
            dstAccessor.clampDataArrays();
            dstAccessor.copyDataToRaster();
        }
    }