rvm1975 Posted July 19, 2018 Share Posted July 19, 2018 #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WinAPIGdi.au3> #include <WindowsConstants.au3> _GDIPlus_Startup() $g_hImage = _GDIPlus_ImageLoadFromFile("output.png") $bmp = _GDIPlus_BitmapCreateFromHBITMAP($g_hImage) $color = _GDIPlus_BitmapGetPixel($bmp, 776, 679) ConsoleWrite("Color at 776, 679 is "&hex($color)&@CRLF) _GDIPlus_Shutdown() I got Color at 776, 679 is 00000000 When I am using example to read .png and draw it on gui pixel color is >>>> Mouse <<<< Position: 776, 679 Cursor ID: 0 Color: 0x147A9C What I am doing wrong? Link to comment Share on other sites More sharing options...
careca Posted July 19, 2018 Share Posted July 19, 2018 (edited) On the getpixel function I get @error 10 and @extended 2, just no idea what they are. On the bitmapcreate function I get @error 10 and @extended 7, just no idea what they are. Edited July 19, 2018 by careca Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
junkew Posted July 19, 2018 Share Posted July 19, 2018 Search for findbmp thread in examples. It has references to the used gdi functions for reading different types of images. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
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