converting object to dri format before storing