Added flatten method for RBD images