There is a easy trick on how to get rid of lens flares in photographs. These flares occur when light rays are refracted at small angles and inhomogeneities in the glass lead to internal reflection or scattering. On an image with lens flares you see colorful dots and I want to show you how to remove these with Gimp.
In this example I have taken two pictures of the same object, looking directly in the sun. Both photographs were taken with the same exposure settings. On the first picture there are lens flares on the right side. The second picture has no lens flares because i covered the sun with my finger. Have a look at these two pictures.
Now with these two photographs we go into Gimp and open up the second image where the sun is covered and open the first one as layer. We need to work with these layers in order to remove the lens flare. There should be two layers now, the image where the sun is covered is under the flare picture. Add a layer mask to the first image (the one on top with the flare).
Make sure the mask is currently selected (there needs to be a white border around it) and take a brush with a size of maybe 80 and paint the area of the flare black. The areas where the mask is black will be fully transparent and than the image under the current layer (without the flare) is visible. When finished with the image, export it or save it as … and it should something like this example below.