timextreme Posted March 23, 2008 Share Posted March 23, 2008 Hey People, i have a problem and searched long time without any result. so i using the UDF GetPixelColor to capture a bmp into the memory, that works nice but, pixelgetcolor return always 000000, except the first retun, here i get a hex color value.... i dont understand this, a friend tested it, and he get all color values, do i tried somthing to update my gdi32.dll without success I use Windows XP Home Edition SP2 ... $hDll = DllOpen("gdi32.dll") $vDC = _PixelGetColor_CreateDC() $vRegion = _PixelGetColor_CaptureRegion($vDC,$iLeft,$iTop,$iRight,$iBottom) If $DebugMode Then logger("debug", "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") If $DebugMode Then logger("debug", "read bitmap to array") ; === read pixels === If $DebugMode And $iShowFillArray Then logger("debug", "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") For $i = 0 to $iHeight-1 Step 1 For $j = 0 to $iWidth-1 Step 1 $sColor = _PixelGetColor_GetPixel($vDC, $j, $i, $hDll) If $DebugMode And $iShowFillArray Then logger("debug", $i & "->" & $j & " color: " & $sColor) If $sColor = "FFFFFF" Then $Coords[$i][$j] = True Else $Coords[$i][$j] = False EndIf Next Next remember this script work on the other pc, not on mine... i get these log entries: 3.03.2008 23:04:13 [debug] capture screen rectangle 23.03.2008 23:04:13 [debug] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23.03.2008 23:04:13 [debug] left=917 23.03.2008 23:04:13 [debug] top=39 23.03.2008 23:04:13 [debug] right=962 23.03.2008 23:04:13 [debug] bottom=47 23.03.2008 23:04:13 [debug] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23.03.2008 23:04:13 [debug] read bitmap to array 23.03.2008 23:04:13 [debug] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23.03.2008 23:04:13 [debug] 0->0 color: 080800 23.03.2008 23:04:13 [debug] 0->1 color: 000000 23.03.2008 23:04:13 [debug] 0->2 color: 000000 23.03.2008 23:04:13 [debug] 0->3 color: 000000 23.03.2008 23:04:13 [debug] 0->4 color: 000000 23.03.2008 23:04:13 [debug] 0->5 color: 000000 23.03.2008 23:04:13 [debug] 0->6 color: 000000 23.03.2008 23:04:13 [debug] 0->7 color: 000000 23.03.2008 23:04:13 [debug] 0->8 color: 000000 23.03.2008 23:04:13 [debug] 0->9 color: 000000 23.03.2008 23:04:13 [debug] 0->10 color: 000000 the first value is right... but the next, i dont undestarnd this shit ( i need help Link to comment Share on other sites More sharing options...
timextreme Posted March 24, 2008 Author Share Posted March 24, 2008 now i installed windows xp professional and get the same values... i dont know why... a new theorie is, that the gdi32.dll is installed by the graphic drivers. i dont know any else know somethin about that? iam usin Nvidia Gerforce 4600 ti i know this is older but is that the reason why i cant use getpixel from the gdi32.dll?? oks help Link to comment Share on other sites More sharing options...
timextreme Posted March 27, 2008 Author Share Posted March 27, 2008 did i say that i need help? ( 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