|
Create a hash of the contents of your original file and save this information. Then when you want to check it, hash the file again and compare the hashes.
|
|
|
|
|
I can do that if I have the both file and I check the both file . I want to check just with a single bitmap file and application to say if it's modificated in Paint or not. I am sorry because I wan't so precise .
Thank you for response
|
|
|
|
|
You don't need to have a copy of the original to check it. All you need is to write the hash to a file. This is a common technique for scenarios where you want to identify if the file changed.
|
|
|
|
|
Sorry, I dont't get the point . To compare the hash of files you need 2 files .
Let's say that a friend give me a bitmap file to check if is modificated in paint or not . How I do that ? I can't compare the hashes because I have just a file .
|
|
|
|
|
Ahhh. I see what you are after here. Sadly for you, you're stuffed here. There's no way, given a single source file, for you to check if Paint modified the file.
|
|
|
|
|
amx_tiger wrote: but it's recognize if a bitmap file is modificated in Gimp/Photoshop and other
How do you recognise these changes, and why can you not use the same test for MSPaint?
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
I use Flags from Bitmap Properties, Image.Flags Property to recognize these changes , but on Paint doesn't work . My application detect these bmp modificated in Paint like unchanged/original.
Thank you for response
|
|
|
|
|
amx_tiger wrote: I use Flags from Bitmap Properties, Flags Property to recognize these changes
How?
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
|
amx_tiger wrote:
if (flags.Contains("a value") || bitdepth.Contains("32"))
According to the links you provided above, the Flags field is of type System.Int32 , and the PixelFormat value is an enumeration, so I do not see what the above test is based on, or how it works.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
Simple answer; you can't.
I'm going to make it worse; if you claim that you app "detects" a modified bitmap, you'd be legitimizing a cheater. The cheater would simply take a hex-editor and change those flags, and you'd be standing there with the app that claims that it was "not modified".
You want a clean game? Have a witness
Bastard Programmer from Hell
|
|
|
|
|
I still haven't seen a smart cheater. Do you?
So, I can't see if the bitmap was modified in Paint ? Any solution?
Almost all the bitmap checker application / script I know doesn't recognize the bitmap which was modified in Paint.
|
|
|
|
|
amx_tiger wrote: I still haven't seen a smart cheater. Do you?
I know quite some, but they don't play games anymore.
amx_tiger wrote: So, I can't see if the bitmap was modified in Paint ? Any solution?
Depends on circumstances. Are all computers under you control? If so, create a small app that draws a red pixel in an unknown location - it should show up on every screenshot. (..and no, that's merely a bump, not a protection)
..or perhaps CS puts a watermark in it's screenshots. That would be neat, but I doubt that they do. Even if, wouldn't stop anybody from using the print-screen button.
amx_tiger wrote: Almost all the bitmap checker application / script I know doesn't recognize the bitmap which was modified in Paint.
Paint (or other apps) don't distinguish between an original file and a duplicate. As far as they're concerned, a bitmap is a description of colors and points, and it looks exactly the same in binary if it's a duplicate.
Bastard Programmer from Hell
|
|
|
|
|
amx_tiger wrote: So, I can't see if the bitmap was modified in Paint ?
If Paint does not add some specific documented signature then you will not be able to.
amx_tiger wrote: Any solution?
Check the last modified date against the created date.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
I though at last modified date, but isn't a perfect solution because the player can save the bitmap with the "Save as...", with the same format and name , then the last modified date it's the same with the time creation
@Eddy: No, the computers aren't under my control. The plugin for screenshot have some information like: the time when the admin take the player screenshot,the nickname of admin, nothing else...
Thank you both for your help.
modified 22-Apr-12 8:55am.
|
|
|
|
|
The ONLY solution you have is to has the file when it's saved and keep that data in a seperate file. When the image is reloaded, hash the file again and compare to the original hash.
|
|
|
|
|
i want a perim algorithm in C#.
please introduce me Helpful E-Books about Greedy Algorithms and source codes with examples.
thank you very MUCH.
|
|
|
|
|
I have no idea[^] but that never stops me.
|
|
|
|
|
i have table in DB (id,name) and have form with panel if i have 5 names in table have 5 buttons in this panel each one beside each other i want if user add any row in this table dynamically when form load add button beside last one to the end of panel and if add another add at bottom of this buttons and sidebar appear
it's difficult to make this buttons add in runtime beside other ... and table can contain 100 rows :S:S
so plz i need help in this
|
|
|
|
|
Mohamed Nabawy wrote: it's difficult to make this buttons add in runtime beside other
No it isn't, but I expect you will run out of room and I doubt your users will like it. Maybe you want a ComboBox or a TabControl?
|
|
|
|
|
first thanks ,i know what u say .. but i wanna to make it ana my boss need this
|
|
|
|
|
Mohamed Nabawy wrote: my boss need this
Bosses rarely know what they need or want. Most times you need to tell them what they need.
Adding a Button at runtime is easy:
0) Instantiate it
1) Set the Text
2) Set the Location
3) Attach event handlers as needed
4) Add it to the Controls collection of the parent (Form)
System.Windows.Forms.Button b = new System.Windows.Forms.Button () ;
b.Text = "Push me" ;
b.Location = new System.Drawings.Point ( x , y ) ;
b.Click += someclickhandler ;
this.Controls.Add ( b ) ;
|
|
|
|
|
i will use it in touch screen So buttons is better than combobox
|
|
|
|
|
i need if row add automatic add button in runtime and be fixed once another row added not every time add all rows in runtime ? ... are this available ?
|
|
|
|
|
Yes. It should be possible - however, you need to try it out.
|
|
|
|