if you read about lockbits, the things you can actually do with it are limited, and doesn't do the job well, theres alot of stuff around lockbits, and i forgot the other1 on gui mmm but ill remember it eventually
the easier and faster way should be around the API but getting it from the x,y
Code:
Dim tmpOleColor As Integer = API_Calls.GetPixel(ScreenDC, xIndex, ypos)
this way your not calling a bitmap and your not performing an stupid task around getpixel and making it slower, but then again thats my point of view on it
sorry playing league of legends cant type much about it LOL
so i was on this matter and it reminds me pixels can be read by percentages, there's no need to read a hole line, only if you want the exact amount of pixels, and yet if you do it like that it will be problematic in a bot, should people heal by the number of pixels that can be 1-500 and how do they know how much help is that ? or should they just count how many pixels to x, x+150 = health x+75 = heals and so on there several options on what your task should be in your case
Code:
Screen = Graphics.FromImage(printScreen as Image);
Your printing screens with is highly unrecommended, and slows the performance of the bot, and you're also doing a bitmap task
Code:
PrintScreen = new Bitmap(System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width, System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height);
So my question is is it really .2 secs when you're reading the wide on the screen ?
Have you confirm that the infinite loop doesn't spill bugs such as "clipboard errors" , " IDATA object" ? Besides that you're using windows.forms i would avoid that at all cost
have u consider working with the API ? mmm im not nearly familiar with csharp i dont know if u have to invoke Gdi32 but your using user32 so ill guess you have to
Code:
<DllImport("Gdi32.dll")>
however this contains
http://msdn.microsoft.com/en-us/library/ms927613.aspx
BitBlt This function transfers pixels from a specified source rectangle to a specified destination rectangle, altering the pixels according to the selected raster operation (ROP) code.
IF YOUR USING BitBlt your going to use extra steps, is better to just call getpixel, but not from the clipboard or bitmap but from the screen, it will be faster and it wont bug when you open/close windows like i believe it occurs with your code "rare" times, it happend with the book pages i posted the code was a bit buggy