Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# graphics urgentz
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 14-May-10 22:11pm
Edited 14-May-10 23:25pm
Moak11.4K
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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[^].
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 7,800
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,790


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 15 May 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100