CableGuy Posted November 19, 2013 Posted November 19, 2013 Hi, I want to compare 2 images i get from _ScreenCapture_Capture(). I search a while and read a lot about ImageMagick and i think i figured out 2 ways i can do this. The first way could be an DllCall. The other way is the COM-Object. First i tried the DllCall but this is not working. I´m always get an Error 1. I think there something wrong with my parameters. Local $result = DllCall($dll, "double", "MagickCompareImages","metric","PSNR","uint",$hReference,"uint",$hImage) COM-Object could work but it seems that he´s not accepting the variable which contains the HBITMAP returned from ScreenCapture_Capture(). I also tried to use _GDIPlus_BitmapCreateFromHBITMAP() for this variable, with no luck. He always returns me "The requested action with this object has failed." $oCompareObject = ObjCreate("ImageMagickObject.MagickImage") $result = $oCompareObject.Compare("-metric", "PSNR", _ $hReference, _ $hImage, _ "null:") Could anyone help me to fix this problem ? Thanks in advance
jftuga Posted November 19, 2013 Posted November 19, 2013 If you can't find an AutoIt solution, I solved this problem some time ago with another program. Here is the info: https://github.com/jftuga/Misc/tree/master/Finding_the_differences_between_two_similar_images -John Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile
CableGuy Posted November 20, 2013 Author Posted November 20, 2013 Thanks for your reply! Calling an exe could be a solution but it is too slow for my program. Any other ideas ?
water Posted November 20, 2013 Posted November 20, 2013 What do you want to achieve? Compare the images and check if they are equal? Or get the areas where the picture has changed? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
CableGuy Posted November 20, 2013 Author Posted November 20, 2013 I want to check if two pictures are equal. And if they are not equal i want to get an percentages or something else for the difference between the two pictures. Thank you
water Posted November 20, 2013 Posted November 20, 2013 I see. Can you please tell us what you try to achieve? I mean, why do you need to compare two screenshots? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
CableGuy Posted November 20, 2013 Author Posted November 20, 2013 i want detect changes made on my desktop. if the images are equal it´s not necessary to save the screenshot again.
water Posted November 20, 2013 Posted November 20, 2013 Changes on the desktop means: New, deleted or moved icons. Anything else? Wouldn't it be easier to monitor the icons? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
CableGuy Posted November 20, 2013 Author Posted November 20, 2013 i´m also want to see if someone is working on my pc, starting programs, browse my files and so on....
water Posted November 20, 2013 Posted November 20, 2013 I would lock the PC so noone can work there But I think it is easier to check for Mouse moves, new tasks etc. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
CableGuy Posted November 20, 2013 Author Posted November 20, 2013 Thanks for your suggestion. But i would prefer to make screenshots so it´s easier to reproduce changes.
Rogue5099 Posted November 23, 2013 Posted November 23, 2013 Although the intentions may be pure and for security, this could also lead to spyware. My projects: Inventory / Mp3 Inventory, Computer Stats
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now