How can I detect if an image was photoshopped? I would like to check JPG files if they were manipulated to change the content.

What I consider NOT photoshopped:


Cropping
Rotating
(Scaling)
Image resolution
Automatic changes smartphones might make


What I consider photoshopping:


Adding a new image on top of parts of the old image
Changing text of a part of an image


How can this automatically be checked?

(And: Are there ready-to-use libraries for it?)
Error Level Analysis as described Error Level Analysis, found at https://github.com/afsalashyana/FakeImageDetection seems to be one seems to be one way:

You exploit that local compression ratios might be different. And it seems to be possible to train neural networks on it.

I didn't find a paper which says how well this works so far