javaimagetampering

If an image is tampered with some additional content, how to remove that additional content from the image in Java?


I want to know if there is any solution for the following scenario:

I have an application which uploads the files, after scanning and transcoding them, onto a server. Suppose, an image file is being uploaded which has been tampered with some additional contents over it. Now, as the uploaded file is illegitimate, I want to remove the additional tampered contents and upload just the original part of this image file. Is it possible to do so in Java?

Thanks.


Solution

  • It's not possible to detect in the general case, but there are some heuristic methods available to determine whether an image has been edited. Try using the tools at http://imageedited.com/ to get an idea of what's possible.

    Removing the edit is a much more difficult problem, which is probably impossible with current methods.