Add functions to convert between PIL and numpy images