Add options to the screen time

This commit is contained in:
Namhyeon Go 2024-09-06 16:42:15 +09:00
parent 28435522de
commit a69603a10c
2 changed files with 3 additions and 3 deletions

View File

@ -397,8 +397,8 @@ public class ScreenMatch
y = y + (b / 2);
// Set range of crop image
int cropX = Math.Max(x - w / 2, 0) + sampleAdjustX;
int cropY = Math.Max(y - h / 2, 0) + sampleAdjustY;
int cropX = Math.Max((x - w / 2) + sampleAdjustX, 0);
int cropY = Math.Max((y - h / 2) + sampleAdjustY, 0);
int cropWidth = Math.Min(w, bitmap.Width - cropX);
int cropHeight = Math.Min(h, bitmap.Height - cropY);
Rectangle cropArea = new Rectangle(cropX, cropY, cropWidth, cropHeight);

View File

@ -13,7 +13,7 @@ DISABLE_SCREEN_TIME=true
DISABLE_FILE_MONITOR=true
; screen or window
SCREEN_TIME_MODE=screen
;filename.exe,backward,save,sample_ocr,sample_clipboard
;filename.exe,backward,save,sample_ocr,sample_clipboard,sample_width=128,sample_height=128,sample_adjust_x=0,sample_adjust_y=0,sample_only=
SCREEN_TIME_PARAMS=
GRPC_HOST=http://localhost:50051
ES_HOST=http://localhost:9200