Jump to content

Recommended Posts

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

Link to post
Share on other sites

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
Link to post
Share on other sites

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...