In my example the text is static, not dynamic. So I can calculate the positions of pixels that are not black and save them to an array after Form loading. Hence I won't need to GetPixel and SetPixel during the iteration process.