Example #1
0
 public static Rectangle GetChatTextAreaRect(BitmapData chatImageData, int threshold = 5)
 {
     using (var locator = new ChatFinder(chatImageData, threshold))
     {
         return(locator.GetChatTextAreaRect());
     }
 }
 private TextLinesFinder(Bitmap chatImage, int threshold = 5)
 {
     this.chatImage = chatImage;
     this.data      = chatImage.LockBits(new Rectangle(0, 0, chatImage.Width, chatImage.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
     if (ChatFinder.IsValidChatImage(this.data, threshold))
     {
         this.textArea = ChatFinder.GetChatTextAreaRect(this.data, threshold);
     }
 }