The effective shapes and sizes of Cu2+ and Mn3+ ions in oxides and fluorides