Is there a way to identify if an image (ex: .jpg) was taken with a camera (either from a phone or some other source) and not fabricated artificially with some tool like Paint or Photoshop?

I give you a more practical example: I would like to distinguish the photo of a receipt from a fake one created on paint.

Are you aware of a smart way to achieve this goal (using Python maybe)?

  • 1
    I am afraid even Boa can't help you much. If photo is not edited but created will be very hard to distinguish. But you can try some forensic tools like this: 29a.ch/photo-forensics/#forensic-magnifier Nov 7, 2022 at 9:28
  • Every day is more and more difficult without dedicated AI software. Forget a composite on Photoshop. 3D photorealistic renders and now AI generated... We are living at an inflection point on this topic.
    – Rafael
    Nov 10, 2022 at 21:31
  • For something like a receipt, unless they are really ham-handed you have little chance. None of the forensic tools or EXIF consistency checks will work if they simply print the altered receipt then take a less than perfect photo of the print. At that point the photo is not altered and the exif is consistent. Nov 13, 2022 at 4:41

3 Answers 3


It really depends on how sophisticated your "adversary" is.

I'd advise a series of tests to catch increasingly sophisticated forgeries.

  1. Look at the image, a real photo has almost never perfectly lit background, perfectly straight lines and perfect contrast.
  2. Look at the EXIF data of the image. Cameras put additional meta information about an image in there. Image editing tools also put information in there. If EXIF data is missing, that's a red flag. But it's relatively easy to forge. There are tools to just copy the EXIF data from one image into another image.
  3. Learn to use tools for image forensics. FotoForensics is a great place to start
  4. Talk to the people. Let them tell the story forward and in reverse order. Check if the information given makes sense and if it's consistent with information on the receipt.

In the end there is no single, simple tool to do it all. There might be good reasons that someone has opened the image in an image editing tool to cut away stuff that does not belong into an image.

There are no perfect technical solutions for social problems (lack of trust/trustworthiness).

  • Thank you very much for the answer. I thought of point 2 but yeah then you can just fake it basically. Ok I will try to see if I can think of another workaround. Nov 7, 2022 at 12:17
  • 2
    "If Exif data is missing, that's a red flag." I'm not so sure it's a red flag. I believe apps such as WhatsApp automatically strip Exif data. So missing Exif data could just indicate a photo has, somewhere along the line, been transmitted via such an app.
    – osullic
    Nov 8, 2022 at 16:25

It's really, really difficult to prove an image is original or doctored - 'photoshopped' has become a verb, in common parlance.

I bought a new pair of cargo trousers yesterday.
How much were they?
I changed two of the prices, but left two alone. Which is altered & which original? Exif data will be stripped by imgur at upload, but prior to that it would be identical to the original photo I took.
It's obviously a photo, because it's not all quite in focus properly. That actually doesn't affect the ease with which you can fairly seamlessly swap the numbers around. None of the image is 'manufactured', it's merely moved from one place to another.

enter image description here

The card data has been blanked & the image cropped, but that doesn't affect the task of swapping the info.
I don't regard this 5-minute attempt as 'perfect', btw. I can see where I cut it, but it would stand reasonable inspection, certainly at life size.

Whether you do this to forge or just for fun, you can either move, or simply re-create elements that don't exist in the original, in a kind of cut & paste way.

This just for fun… Harry Potter's bubble bath.
The G doesn't exist anywhere else on the label, so it's manufactured out of tiny bits of other letters. Again, it's not perfect, but it never needed to be.

enter image description here

The original image I uploaded here gives away its secrets under forensic analysis - Romeo's link to https://29a.ch/photo-forensics/#forensic-magnifier really showed up where I'd rough-cut & pasted.

enter image description here

So, armed with that knowledge, I made another that has much less of a giveaway

enter image description here

All I did was change the relationship between foreground & background sharpness & reduce saturation a little more, to prevent it showing under Histogram Equalisation so easily.

  • Well done. The ELA doesn't really give a hint... If you look at strings in fotoforensics.com/… "ADOBE" is a hint but there are good, non nefarious reasons (like cropping down and straightening) to open and save in PS.
    – kruemi
    Nov 7, 2022 at 13:00
  • Thanks for your answer! Yes that is exactly what I am trying to avoid! It sounds like it is almost impossible to detect it. For me it would already be a great success if I could detect if it is a computer generated image or a photo from a camera. Nov 7, 2022 at 13:36
  • 2
    I'm no professional forger, but it is far simpler to 'doctor' a photo than create the impression of one from scratch. All you need are most of the elements, most people would never notice if some had been swapped or re-drawn by compositing other elements. See the new image added to my answer
    – Tetsujin
    Nov 7, 2022 at 13:43
  • 1
    Downvoter - any clues as to what you didn't like about this answer? Ah, maybe just got out the wrong side of the bed. I see everybody got one :\
    – Tetsujin
    Nov 7, 2022 at 17:51
  • At the risk of incriminating myself, the photo in my own passport is actually a composite. I had 2 (digital) headshots taken, didn't really like either, so edited my head from one onto my shoulders from the other. Submitted with my passport application and accepted without question. But technically it's not a one-shot photo of me ¯\_(ツ)_/¯
    – osullic
    Nov 8, 2022 at 16:31

Although new software for automatic photo correction and repair (such as Remini) are able to somehow convert pixel-based photos into a vector photo, be careful, as other users have answered this question well in the answers above, from In my opinion, the fastest and most reliable way to determine the originality of the image should be searched in the Exif and metadata of that photo, which can be obtained by taking a property or full information from that file in Photoshop, camera brand, lens type, specifications of the exposure triangle on the sensor. The camera, the initial date of the recorded photo, etc., finally, I assume that the second image of the receipt, which is apparently pixelated, was repaired by an interface software, check the Exif and metadata of both photos and compare the editing dates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.