public boolean intersects(ImageMask other) {
        if(other == null)
            return false;
        for(int i = 0; i < width; i++)
            for(int j = 0; j < height; j++)
                for(int k = 0; k < other.getWidth(); k++)
                    for(int l = 0; l < other.getHeight(); l++)
                        if(x+i*scale==(int)Math.round(other.getX()+k*other.getScale()) &&
                                y+j*scale==(int)Math.round(other.getY()+l*other.getScale()))
                            return true;
        return false;
    }