Matrix elements of the electromagnetic operator between kaon and pion states