The devices also let users erase, move and resize unwanted elements in a photo – from people to buildings – “filling in” the space left behind with what’s called Magic Editor. This uses what’s known as deep learning, effectively an artificial intelligence algorithm working out what textures should fill the gap by analysing the surrounding pixels it can see, using knowledge it has gleaned from millions of other photos.