Look up "adversarial networks". If you have a classifier that tells when an image is faked, then you can use that classifier to train a network to generate images which make the classifier say the images are real.
ya but isn't the adversarial network in this case just a more sophisticated version of the error function (i.e. verifying function) the others have talked about?