
-----------------------------------
Andy
Sun Jan 11, 2004 9:06 pm

pic ids
-----------------------------------
ok i know how to take a snap shot on the screen but what i want to know is i you save two pictures using Pic.Save can you compare them to see if they're the same picture?

-----------------------------------
Cervantes
Sun Jan 11, 2004 9:53 pm


-----------------------------------
compare them in Turing or in Windows?

I haven't used Pic.Save before.. the only way I can think to compare them is to compare their file sizes. I know that doesn't mean they're the same, but its the best I can do :|

-----------------------------------
McKenzie
Sun Jan 11, 2004 10:05 pm


-----------------------------------
You have to use this interesting function called whatdotcolour, maybe you've heard of it

var same :=true
Pic.Draw(firstpic,somex,somey,picXor)
Pic.Draw(secondpic,somex,somey,picXor)
for x:somex .. somex + picWidth -1
    for y:somey .. somey + picHeight -1
        if whatdotcolour(x,y) > 0 then
            same := false
        end if
    end for
end for


-----------------------------------
Cervantes
Sun Jan 11, 2004 10:10 pm


-----------------------------------
whatdotcolour?  never heard of it!   :think: 
but the whatdotcolour > 0 part confuses me....    so your just checking the outline..?

-----------------------------------
McKenzie
Sun Jan 11, 2004 10:10 pm


-----------------------------------
but seriously you can just open them up as binary files read one character at a time from each and compare them this way.

-----------------------------------
McKenzie
Sun Jan 11, 2004 10:16 pm


-----------------------------------
it'll work, but it was a joke. Dodge loves whatdotcolour, and I recently wrote a tutorial on the almost useless ability to draw pics using picXor. I figured why not combine them? whatdotcolour is actually quite usefull. What it does is return the colour value of a pixel on the screen. In this case if both pics are the same the XOR will cause the to blank out. So I check the entire area to see if its all white.

-----------------------------------
Cervantes
Sun Jan 11, 2004 10:23 pm


-----------------------------------
yeah I kinda noticed his love for whatdotcolor lol.  I love it too :D  (btw what I said about never heard of it was a joke too)

-----------------------------------
McKenzie
Sun Jan 11, 2004 10:26 pm


-----------------------------------
oops, should have figured that when you asked about the outline  :oops:

-----------------------------------
Cervantes
Sun Jan 11, 2004 10:28 pm


-----------------------------------
indeed. :P

dodge what do you need this for??  are you just playing around or are you making some elaborate program (that I'm assuming would use whatdotcolor exclusively :P)
