Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
Hi,

Please help me how to find a photograph is original or photoshopped using C# coding. I seen many programs are there which can extract exif tags but not able to find the program which can find whether the photograph is original or not.

Please help me.

Regards
Gsudha
Posted
Comments
Sinisa Hajnal 26-Sep-14 2:12am    
I don't think that is possible absolutely, a pixel is a pixel. It takes human and careful analysis (visual) of the magnified image to find slight distortions / irregularities. You MIGHT be able to create such program, but it would still produce false positives.
http://www.poynter.org/latest-news/regret-the-error/173387/three-ways-to-spot-if-an-image-has-been-manipulated/

However, you can try public services (see solution) - again, I don't know how accurate they are.
[no name] 26-Sep-14 2:18am    
You make the statement: "not able to find the program which can find whether the photograph is original or not".
Switch on your brain and draw a conclusion for yourself.

You can try JPEG snoop[^] - but it is limited to jpegs and I have no idea how effective it is.

All it would take to fool it is editing EXIF data.

Some services
Image edited[^]

Fotoforensics[^]
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 26-Sep-14 2:28am    
I never tried any of them, but interesting, my 5, thanks for sharing.
And I explained the idea in Solution 2; please see.
—SA
It's trivial to extract EXIF and any other metadata. But is not much harder to fake it. How could you even think of such a useless idea?

But the technology which detects the difference between raw images out-of-camera and digitally process one does exist. I've read about it. The exact fixed and well-known layout of the sub-pixels inside a pixel, as well as CCD or CMOS physics, create subliminal correlation in pixel values. This correlation is immediately destroyed if any global tuning is used, such as color transform (which is done almost always in post-processing).

If you can use this idea, please use if.

However, you should understand that this is valid only for raw images. In modern cameras, a lot of processing can be done after the image is already digitized. And of course, it cannot be used to detect plagiarism, because original authors usually do at least minimal post-processing.

So, the technology is mostly used in cases where a photograph can be useful in legal evidence. When you need legal document, shoot in raw.

—SA
 
Share this answer
 
v2
Comments
Sinisa Hajnal 26-Sep-14 3:40am    
Faking EXIF was maybe a wrong term - using different program - maybe image editor inside the camera for the last saving - so that EXIF has its editor data changed is more what I was thinking of.

And "much harder" doesn't mean impossible, if someone really wants to fake the image. Also there are EXIF editors: check photome.de...

I'm not image expert, I did some basic checkings on some transportation scanned documents, but that is all. That is why I suggested public services :)
Sergey Alexandrovich Kryukov 26-Sep-14 12:11pm    
That again confirms that EXIF is irrelevant. After all, the image editor itself may not touch EXIF data at all. How can it be indicative?
—SA
gsudha 26-Sep-14 6:33am    
Ok. i will put my question in this way. if any jpeg file opens in the photoshop and modified and after that if it save as jpeg file, how can we find that using c# code. I used jpegsnoop. Yes it is fine to check single file. If i do bulk process it creates notepad file for each photograph. We need to open each and every one of the file and check. whether it is modified or not. it is manual process.

If any one fake exif not a problem. the end user who is going to use this program wont be a technical expert, he just know the photoshop and computer. I want to know the the differences in the exif tags when we process in the photoshop before and after.
Sergey Alexandrovich Kryukov 26-Sep-14 12:09pm    
You cannot find it out. You only can detect the difference between out-of-camera image and the image after any kind of retouch.
—SA
Sinisa Hajnal 29-Sep-14 7:40am    
@Sergey Alexandrovič Kryukov: (Not on-topic): is there a way to know who votes 1 on some of the answers / comments. I have three solutions downvoted without comment even 1 that is correct, detailed and accepted...I could maybe find fault in those having only links or offering just advice instead of finished code.

I know I hurry some of the answers and leave something for the questioner to lookup, but I try honestly to help. And having 1-vote on accepted solution looks strange :( Any way I could influence that? You have more experience on the boards then I do.

Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900