Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I want to remove the changes done to my image by others and get back the original image. I can do a comparison of original and modified image. But what if I have a single image that has been modified by others, is there any way to remove such a change? I need it soon... can any body tell me how to do it. Thank you.
Posted
Updated 14-May-10 22:25pm
v3

Needing it "soon" doesn't affect our willingness to help you because urgency on your part doesn't imply an emergency on our part.

You're going to have to setup some sort of "undo" feature so you can undo changes in the reverse order that they occurred. The brute force approach is to maintain a copy of the image after each change. Since some images can be rather huge, you'll probably have to limit the number of undo's that the user can - ummm - do.

I suppose you could xor the image so that only the pixels that changed are kept in the undo buffer, and then you can simply reverse that process to regain the previous image iteration.

You can also maintain a layer buffer that only has the changes that were made in each layer. when the user wants to undo, simply delete the newest layer from the list. When the user saves the image, merge the layers, and then save.

Unfortunately, this is not a trivial task where images are concerned, and you'll have to come up with the code yourself. On the bright side, you'll be 1 step closer to being able to call yourself a programmer, and you can post an article here describing how you accomplished your task.
 
Share this answer
 
v3
Last time you were modifying image byte array...

Now you want modified image back. If you tracked the changes then 'yes' you can get that, or else no way to get the original back.
 
Share this answer
 
I realise that you are new to this site and so might not be familiar with its customs.

It is considered rude to post the same question in more than one place, please stop doing it!

If you are unsure about what is and what is not acceptable read the posting guidelines. CodeProject Forum Guidelines[^].
 
Share this answer
 

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