Hi, I have a simple function to scan a rectangle of pixels on the active window, say its 20x40 pixels. So I push 800 hex numbers into an array in whatever order I like. Handy if I want to scan the same rectangle again a little later to see if the colors have changed significantly. But what I really want is to save them to disk as a .bmp file so I can look at the image later in a graphics program and give the file a meaningful name, eg wizard.bmp.
Then I could load it and other similar files on another day to compare with a new 20x40 rectangle from the screen to find if it's a wizard, or a goblin, or whatever.
How can I save these pixels to a .bmp file? And later, when I load the file, how can I access the data in the right order to compare the images?
I have a VisualBasic type program that can do this easily but it only works scanning its own windows, which is no use. I know I could just save the files as lists of pixels but then I couldn't easily determine what the pixels represent.
I'd be grateful for any help anyone could give me with this.
Steve
Making .BMPs from PixelGetColor rectangle scans?
Re: Making .BMPs from PixelGetColor rectangle scans?
For 800 pixels is there any reason why you are not using: ImageSearch?
Checking 800 pixels is going to be really... slow.
Checking 800 pixels is going to be really... slow.
Re: Making .BMPs from PixelGetColor rectangle scans?
It's not a picture I want to get it's just part of the window, which is probably one huge graphic. I haven't noticed that grabbing 800 pixels is all that slow.
Re: Making .BMPs from PixelGetColor rectangle scans?
Xtra said it all ...it is slow using pixelgetcolor! You could get the screen area using gdip ,save it to bmp if needed .If you want to search the pixel values search for "lockbits" on this forum.
https://autohotkey.com/board/topic/9142 ... of-screen/
gdip lbrary
https://autohotkey.com/boards/viewtopic.php?t=6517
to get hex values out of bitmap
https://autohotkey.com/boards/viewtopic.php?t=35888
https://autohotkey.com/board/topic/9142 ... of-screen/
gdip lbrary
https://autohotkey.com/boards/viewtopic.php?t=6517
to get hex values out of bitmap
https://autohotkey.com/boards/viewtopic.php?t=35888
Who is online
Users browsing this forum: TAC109 and 138 guests