Magnetic resonance images which are corrupted by noise and by smooth modulations are corrected using a variational formulation incorporating a total variation like penalty for the image and a high order penalty for the modulation. The optimality system is derived and numerically discretized. The cost functional used is non-convex, but it possesses a bilinear structure which allows the ambiguity among solutions to be resolved technically by regularization and practically by normalizing the maximum value of the modulation. Since the cost is convex in each single argument, convex analysis is used to formulate the optimality condition for the image in terms of a primaldual system. To solve the optimality system, a nonlinear GaussSeidel outer iteration is used in which the cost is minimized with respect to one variable after the other using an inner generalized Newton iteration. Favorable computational results are shown for artificial phantoms as well as for realistic magnetic resonance images. Reported computational times demonstrate the feasibility of the approach in practice.