Jump to content

Recommended Posts

Posted

Hello

I need to read a graphic file and know if  a determinate point  the color is green.

If the graphic is in the screen I can use   PixelGetColor().

Can I read the graphic whitout show it in the screen?

Thanks

Javier

Posted (edited)

I don't have all the exact commands in my head at the moment, but you can do it with something like.

#include <GDIPlus.au3>

; Initialize GDI+ library
_GDIPlus_Startup()

; Some color, maybe even 0, 0, 0 black
$pixelDave = 4278190080
$hBMP = _GDIPlus_BitmapCreateFromFile($rect_file)
If _GDIPlus_BitmapGetPixel($hBMP, $x, $y) <> $pixelDave Then
    ConsoleWrite("Dave's not here")
Else
    ConsoleWrite("Dave")
EndIf
_GDIPlus_Shutdown()

Something like this does what you want to do.

Edited by Xandy

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...