Why would cropping alter the file in-place? That would presumably leave the image corrupted if (say) your phone died during the cropping process; it would seem much better to save the cropped image separately and then overwrite the original file atomically. After all, it's the same amount of data to write either way.