search pixel on image.bmp

08/29/2013 15:33 fuso98#1
I need to know a metod or a simple function/UDF wich i can do a pixelsearch on an image that is in the same folder of the script. How can i do this?
08/29/2013 17:20 Sh1Rum#2
When i understand you ..
Code:
#requireadmin
#noTrayIcon
$File = FileSelectFolder ("","","File(*.bmp)")
Run ($File)
$Pixel = PixelSearch (...)
Msgbox (64,"",$Pixel)
Der code hat fehler ..konnte nicht testen q.q also das nur ne kleine Vorlage :D
08/29/2013 18:42 fuso98#3
I need to search it in background while i can do other things on my pc.
08/29/2013 19:22 butter123#4
use gdi plus to read the colors into an array and then search the array for the color
08/29/2013 19:32 fuso98#5
I don't know very well how to use gdi. there's some example or other metod?
08/29/2013 20:10 alpines#6
I think it's better to use ImageSearch here.
08/29/2013 20:18 butter123#7
if you want to search for an image on the screen then use imagesearch
if you want to search inside a picture for a color then forget what i said before :D

use gdi to convert a picture into a bmp. then read the file bitwise. on wiki u can find how the bmp is build up. cut of the header and you have the rgb values of each pixel left. now you can search for the color.
09/04/2013 20:59 yangc10#8
image search works while you're not doing anything on screen. If you want it to search image while you work on other stuff, thats more of a memory automation. If you know how to work with memory automation, it's more accurate depending on what you want to do.
09/04/2013 21:11 fuso98#9
I need to do a bot that work in background. I know how to Pixelsearch on background mode, but now i need help to find an image.bmp into another image.bmp/jpg . I don't know how to do it with memory or GDI+ . But i need that the script do it very fast like or faster the normal imagesearch.dll (i mean like 50-90 ms).