Phase inversion of Pickering emulsions