diff --git a/.flake8 b/.flake8
new file mode 100644
index 00000000..387edfed
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,31 @@
+[flake8]
+color=always
+max-line-length=120
+; Auto generated
+exclude=src/gen/, typings/cv2-stubs/__init__.pyi
+ignore=
+ W503, ; Linebreak before binary operator
+ E402, ; Allow imports at the bottom of file
+ Y026, ; Not using typing_extensions
+ SIM105, ; contextlib.suppress is roughly 3x slower than try/except
+ CCE001, ; False positives for attribute docstrings
+per-file-ignores=
+ ; Docstrings in type stubs
+ ; Function bodys contain other than just ... (eg: raise)
+ ; Single quote docstrings
+ typings/cv2-stubs/__init__.pyi: Q000,E704,E501,N8,A002,A003,CCE002,F401, Y021,Y010,Q002
+ ; Quotes
+ ; Allow ... on same line as def
+ ; Line too long
+ ; Naming conventions can't be controlled for external libraries
+ ; Argument names can't be controlled for external libraries
+ ; attribute names can't be controlled for external libraries
+ ; False positive Class level expression with elipsis
+ ; Type re-exports
+ *.pyi: Q000,E704,E501,N8,A002,A003,CCE002,F401
+; PyQt methods
+ignore-names=closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
+; McCabe max-complexity is also taken care of by Pylint and doesn't fail the build there
+; So this is the hard limit
+max-complexity=32
+inline-quotes=double
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 00000000..0f31025a
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,67 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+ push:
+ branches: [main, master, develop, dev, 2.0.0]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [develop, dev, 2.0.0]
+ schedule:
+ - cron: "26 13 * * 6"
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: ["python"]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
+ # Learn more:
+ # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
+
+ # âšī¸ Command-line programs to run using the OS shell.
+ # đ https://git.io/JvXDl
+
+ # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml
new file mode 100644
index 00000000..62d39ad2
--- /dev/null
+++ b/.github/workflows/lint-and-build.yml
@@ -0,0 +1,134 @@
+# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
+name: Lint and build
+on:
+ workflow_dispatch: # Allows manual builds
+ push:
+ branches:
+ - main
+ - master
+ paths:
+ - "**.py"
+ - "**.pyi"
+ - "**.ui"
+ pull_request:
+ branches:
+ - main
+ - master
+ - dev*
+ - 2.0.0
+ paths:
+ - "**.py"
+ - "**.pyi"
+ - "**.ui"
+
+env:
+ GITHUB_HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
+
+jobs:
+ Pyright:
+ runs-on: windows-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ["3.9", "3.10"]
+ steps:
+ - name: Checkout ${{ github.repository }}/${{ github.ref }}
+ uses: actions/checkout@v3
+ - name: Set up Node
+ uses: actions/setup-node@v3
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ cache: "pip"
+ cache-dependency-path: "scripts/requirements*.txt"
+ - run: scripts/install.ps1
+ shell: pwsh
+ - name: Analysing the code with Pyright
+ run: pyright --warnings
+ Pylint:
+ runs-on: windows-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ["3.9", "3.10"]
+ steps:
+ - name: Checkout ${{ github.repository }}/${{ github.ref }}
+ uses: actions/checkout@v3
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ cache: "pip"
+ cache-dependency-path: "scripts/requirements*.txt"
+ - run: scripts/install.ps1
+ shell: pwsh
+ - name: Analysing the code with Pylint
+ run: pylint --reports=y --output-format=colorized src/
+ Flake8:
+ runs-on: windows-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ["3.9", "3.10"]
+ steps:
+ - name: Checkout ${{ github.repository }}/${{ github.ref }}
+ uses: actions/checkout@v3
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ cache: "pip"
+ cache-dependency-path: "scripts/requirements*.txt"
+ - run: scripts/install.ps1
+ shell: pwsh
+ - name: Analysing the code with Flake8
+ run: flake8
+ Bandit:
+ runs-on: windows-latest
+ steps:
+ - name: Checkout ${{ github.repository }}/${{ github.ref }}
+ uses: actions/checkout@v3
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.10"
+ cache: "pip"
+ cache-dependency-path: "scripts/requirements*.txt"
+ - run: scripts/install.ps1
+ shell: pwsh
+ - name: Analysing the code with Bandit
+ run: bandit -n 1 --severity-level medium --recursive src
+ Build:
+ runs-on: windows-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ["3.10"]
+ steps:
+ - name: Checkout ${{ github.repository }}/${{ github.ref }}
+ uses: actions/checkout@v3
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ cache: "pip"
+ - run: scripts/install.ps1
+ shell: pwsh
+ - run: scripts/build.ps1
+ shell: pwsh
+ - name: Upload Build Artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: AutoSplit (Python ${{ matrix.python-version }})
+ path: dist/AutoSplit*
+ if-no-files-found: error
+ - name: Upload Build logs
+ uses: actions/upload-artifact@v3
+ with:
+ name: Build logs (Python ${{ matrix.python-version }})
+ path: |
+ build/AutoSplit/*.toc
+ build/AutoSplit/*.txt
+ build/AutoSplit/*.html
+ if-no-files-found: error
diff --git a/.gitignore b/.gitignore
index 6596996f..84c492a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+# Caches
+.cache/
+
# Byte-compiled / optimized / DLL files
__pycache__/
@@ -7,6 +10,10 @@ __pycache__/
env/
build/
dist/
+*.prof
+# Generated
+**/gen/*.py
+!**/gen/*.pyi
# PyInstaller
# Usually these files are written by a python script from a template
@@ -16,3 +23,4 @@ dist/
# Dev settings
*.pkl
+settings.toml
diff --git a/.markdownlint.json b/.markdownlint.json
new file mode 100644
index 00000000..9ecf9f17
--- /dev/null
+++ b/.markdownlint.json
@@ -0,0 +1,6 @@
+{
+ "default": true,
+ "MD001": false,
+ "MD013": false,
+ "MD025": false
+}
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index ca9b77ca..e6b47305 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,14 +1,40 @@
+// Keep in alphabetical order
{
"recommendations": [
- "ms-python.vscode-pylance",
- "ms-python.python",
- "sonarsource.sonarlint-vscode",
+ "bungcip.better-toml",
"davidanson.vscode-markdownlint",
+ "eamodio.gitlens",
+ "ms-python.flake8",
+ "ms-python.python",
+ "ms-python.vscode-pylance",
+ "ms-vscode.powershell",
+ "pkief.material-icon-theme",
+ "redhat.vscode-yaml",
"shardulm94.trailing-spaces",
- "eamodio.gitlens"
+ "sonarsource.sonarlint-vscode"
],
"unwantedRecommendations": [
+ // Must disable in this workspace //
+ //
+ // VSCode has implemented an optimized version
+ "coenraads.bracket-pair-colorizer",
+ "coenraads.bracket-pair-colorizer-2",
+ // Lots of conflicts
+ "esbenp.prettier-vscode",
+ // Replaced by ESLint
+ "eg2.tslint",
+ "ms-vscode.vscode-typescript-tslint-plugin",
+ // Obsoleted by Pylance
"ms-pyright.pyright",
- "esbenp.prettier-vscode"
+ // Not configurable per workspace, tends to conflict with other linters
+ // Use eslint-plugin-sonarjs for JS/TS projects
+ "sonarsource.sonarlint-vscode",
+ //
+ // Don't recommend to autoinstall //
+ //
+ // This is a Git project
+ "johnstoncode.svn-scm",
+ // Prefer using VSCode itself as a text editor
+ "vscodevim.vim",
]
}
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 00000000..db52528d
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,29 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Python: AutoSplit",
+ "type": "python",
+ "request": "launch",
+ "preLaunchTask": "Compile resources",
+ "program": "src/AutoSplit.py",
+ "console": "integratedTerminal",
+ "justMyCode": true
+ },
+ {
+ "name": "Python: AutoSplit --auto-controlled",
+ "type": "python",
+ "request": "launch",
+ "preLaunchTask": "Compile resources",
+ "program": "src/AutoSplit.py",
+ "args": [
+ "--auto-controlled"
+ ],
+ "console": "integratedTerminal",
+ "justMyCode": true
+ }
+ ]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index d8155e25..601ce64c 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -10,59 +10,100 @@
},
"editor.detectIndentation": false,
"editor.tabSize": 2,
- "[python]": {
- "editor.tabSize": 4,
- "editor.rulers": [
- 79,
- 100,
- 120,
- ]
- },
- // Keeping autoformat to false for now to keep minimal changes
- "editor.formatOnSave": false,
+ "editor.formatOnSave": true,
"editor.codeActionsOnSave": {
- "source.fixAll": false,
+ "source.fixAll": true,
+ "source.fixAll.unusedImports": false,
+ "source.fixAll.convertImportFormat": true,
+ "source.organizeImports": true,
},
- "python.linting.enabled": true,
- "python.analysis.typeCheckingMode": "basic",
- "python.analysis.diagnosticSeverityOverrides": {
- // Too many false positives with pywin32 (all functions have 0 arguments in type stub)
- "reportGeneralTypeIssues":"none"
- },
- // https://code.visualstudio.com/docs/python/linting#_specific-linters
- // Maybe consider PyLint once all Flake8 linting is fixed
- "python.linting.pylintEnabled": false,
- "python.linting.flake8Enabled": true,
- "python.linting.mypyEnabled": true,
- // Flake8 is already a pycodestyle wrapper
- "python.linting.pycodestyleEnabled": false,
- "python.linting.pylintArgs": [
- "--disable=no-member",
- "--max-line-length=120"
- ],
- "python.linting.flake8CategorySeverity.E": "Warning",
- "python.linting.flake8Args": [
- "--max-line-length=120"
- ],
- "python.linting.mypyArgs": [
- "--max-line-length=120"
- ],
- "python.formatting.autopep8Args": [
- "--max-line-length=120"
- ],
"files.insertFinalNewline": true,
- "trailing-spaces.deleteModifiedLinesOnly": true,
"trailing-spaces.includeEmptyLines": true,
"trailing-spaces.trimOnSave": true,
"trailing-spaces.syntaxIgnore": [
"markdown"
],
"files.associations": {
+ "*.json": "json",
+ "extensions.json": "jsonc",
+ "settings.json": "jsonc",
"*.qrc": "xml",
"*.ui": "xml"
},
- "markdownlint.config": {
- "default": true,
- "MD025": false,
+ "files.exclude": {
+ "**/.git": true,
+ "**/.svn": true,
+ "**/.hg": true,
+ "**/CVS": true,
+ "**/.DS_Store": true,
+ "**/Thumbs.db": true,
+ "build": true,
+ ".mypy_cache": true,
+ "**/__pycache__": true,
+ },
+ "search.exclude": {
+ "**/bower_components": true,
+ "**/*.code-search": true,
+ "*.lock": true,
+ },
+ "[python]": {
+ "editor.tabSize": 4,
+ "editor.rulers": [
+ 72, // PEP8-17 docstrings
+ // 79, // PEP8-17 default max
+ // 88, // Black default
+ 99, // PEP8-17 acceptable max
+ 120, // Our hard rule
+ ],
+ },
+ "python.analysis.diagnosticMode": "workspace",
+ "python.linting.enabled": true,
+ "python.linting.pylintEnabled": true,
+ "python.linting.pylintCategorySeverity.convention": "Warning",
+ "python.linting.pylintCategorySeverity.refactor": "Warning",
+ // Use the new Flake8 extension instead
+ "python.linting.flake8Enabled": false,
+ "flake8.severity": {
+ "convention": "Warning",
+ "error": "Error",
+ "fatal": "Error",
+ "refactor": "Warning",
+ "warning": "Warning",
+ "info": "Warning",
+ // builtins
+ "A": "Warning",
+ // mccabe
+ "C": "Warning",
+ // class attributes order
+ "CCE": "Warning",
+ // pycodestyles
+ "E": "Warning",
+ "E9": "Error", // Runtime
+ "W": "Warning",
+ // Pyflakes
+ "F": "Warning",
+ // PEP8 Naming convention
+ "N": "Warning",
+ // Simplify
+ "SIM": "Warning",
+ "SIM9": "Information",
+ // PYI
+ "Y": "Warning",
},
+ // PyRight obsoletes mypy
+ "python.linting.mypyEnabled": false,
+ // Is already wrapped by Flake8, prospector and pylama
+ "python.linting.pycodestyleEnabled": false,
+ // Just another wrapper, use Flake8 OR this
+ "python.linting.prospectorEnabled": false,
+ // Just another wrapper, use Flake8 OR this
+ "python.linting.pylamaEnabled": false,
+ "python.linting.banditEnabled": true,
+ "powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline",
+ "powershell.codeFormatting.autoCorrectAliases": true,
+ "powershell.codeFormatting.trimWhitespaceAroundPipe": true,
+ "powershell.codeFormatting.useConstantStrings": true,
+ "powershell.codeFormatting.useCorrectCasing": true,
+ "powershell.codeFormatting.whitespaceBetweenParameters": true,
+ "powershell.integratedConsole.showOnStartup": false,
}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 00000000..39a29147
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,32 @@
+{
+ "version": "2.0.0",
+ "windows": {
+ "options": {
+ "shell": {
+ "executable": "powershell",
+ "args": [
+ "-NoProfile",
+ "-ExecutionPolicy",
+ "Bypass",
+ "-Command"
+ ]
+ }
+ }
+ },
+ "tasks": [
+ {
+ "label": "Compile resources",
+ "type": "shell",
+ "command": "scripts/compile_resources.ps1"
+ },
+ {
+ "label": "Build AutoSplit",
+ "type": "shell",
+ "command": "scripts/build.ps1",
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ }
+ }
+ ]
+}
diff --git a/PyInstaller/hooks/hook-requests.py b/PyInstaller/hooks/hook-requests.py
new file mode 100644
index 00000000..13de4b6b
--- /dev/null
+++ b/PyInstaller/hooks/hook-requests.py
@@ -0,0 +1,4 @@
+from PyInstaller.utils.hooks import collect_data_files
+
+# Get the cacert.pem
+datas = collect_data_files("certifi")
diff --git a/README.md b/README.md
index 4d021064..1533db35 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,12 @@
-# AutoSplit
+# AutoSplit [![CodeQL](/../../actions/workflows/codeql-analysis.yml/badge.svg)](/../../actions/workflows/codeql-analysis.yml) [![Lint and build](/../../actions/workflows/lint-and-build.yml/badge.svg)](/../../actions/workflows/lint-and-build.yml)
+
+[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Avasam_Auto-Split&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=Avasam_Auto-Split)
+[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=Avasam_Auto-Split&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=Avasam_Auto-Split)
+[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=Avasam_Auto-Split&metric=security_rating)](https://sonarcloud.io/dashboard?id=Avasam_Auto-Split)
+[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=Avasam_Auto-Split&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=Avasam_Auto-Split)
+[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Avasam_Auto-Split&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Avasam_Auto-Split)
+[![SemVer](https://badgen.net/badge/_/SemVer%20compliant/grey?label)](https://semver.org/)
Easy to use image comparison based auto splitter for speedrunning on console or PC.
@@ -11,27 +18,30 @@ This program can be used to automatically start, split, and reset your preferred
## DOWNLOAD AND OPEN
-### Compatibility
-
-- Windows 7, 10, and 11.
+- Download the [latest version](/../../releases/latest)
-### Opening the program
+### Compatibility
-- Download the [latest version](/../../releases/latest)
-- Extract the file and open AutoSplit.exe.
+- Python 3.9+
+- Windows 10 and 11.
### Building
(This is not required for normal use)
-- Microsoft Visual C++ 14.0 or greater may be required. Get it with [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
-- Read [requirements.txt](/scripts/requirements.txt) for information on how to install, run and build the python code
- - Run `.\scripts\install.bat` to install all dependencies
- - Run the app directly with `py .\src\AutoSplit.py [--auto-controlled]`
- - Run `.\scripts\build.bat` to build an executable
-- Recompile resources after modifications by running `.\scripts\compile_resources.bat`
+- Python 3.9 - 3.10.
+- Microsoft Visual C++ 14.0 or greater may be required to build the executable. Get it with [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
-## Split Image Folder
+- Read [requirements.txt](/scripts/requirements.txt) for more information on how to install, run and build the python code.
+ - Run `./scripts/install.ps1` to install all dependencies.
+ - Run the app directly with `./scripts/start.ps1 [--auto-controlled]`.
+ - Run `./scripts/build.ps1` to build an executable.
+- Recompile resources after modifications by running `./scripts/compile_resources.ps1`.
+- All configured for VSCode, including Run (F5) and Build (Ctrl+Shift+B) commands.
+
+## OPTIONS
+
+#### Split Image Folder
- Supported image file types: .png, .jpg, .jpeg, .bmp, and [more](https://docs.opencv.org/3.0-beta/modules/imgcodecs/doc/reading_and_writing_images.html#imread).
- Images can be any size.
@@ -40,58 +50,111 @@ This program can be used to automatically start, split, and reset your preferred
- Custom split image settings are handled in the filename. See how [here](#custom-split-image-settings).
- To create split images, it is recommended to use AutoSplit's Take Screenshot button for accuracy. However, images can be created using any method including Print Screen and [Snipping Tool](https://support.microsoft.com/en-us/help/4027213/windows-10-open-snipping-tool-and-take-a-screenshot).
-## Capture Region
+#### Capture Region
- This is the region that your split images are compared to. Usually, this is going to be the full game screen.
-- Click "Select Region"
+- Click "Select Region".
- Click and drag to form a rectangle over the region you want to capture.
- Adjust the x, y, width, and height of the capture region manually to make adjustments as needed.
-- If you want to align your capture region by using a reference image, click "Align Region"
+- If you want to align your capture region by using a reference image, click "Align Region".
- You can freely move the window that the program is capturing, but resizing the window will cause the capture region to change.
- Once you are happy with your capture region, you may unselect Live Capture Region to decrease CPU usage if you wish.
- You can save a screenshot of the capture region to your split image folder using the Take Screenshot button.
-## Max FPS
+#### Avg. FPS
-- Calculates the maximum comparison rate of the capture region to split images. This value will likely be much higher than needed, so it is highly recommended to limit your FPS depending on the frame rate of the game you are capturing.
+- Calculates the average comparison rate of the capture region to split images. This value will likely be much higher than needed, so it is highly recommended to limit your FPS depending on the frame rate of the game you are capturing.
-## OPTIONS
+### Settings
-### Comparison Method
+#### Comparison Method
-- There are three comparison methods to choose from: L2 Norm, Histograms, and pHash.
- - L2 Norm: This method should be fine to use for most cases. it finds the difference between each pixel, squares it, and sums it over the entire image and takes the square root. This is very fast but is a problem if your image is high frequency. Any translational movement or rotation can cause similarity to be very different.
+- There are three comparison methods to choose from: L2 Norm, Histograms, and Perceptual Hash (or pHash).
+ - L2 Norm: This method should be fine to use for most cases. It finds the difference between each pixel, squares it, sums it over the entire image and takes the square root. This is very fast but is a problem if your image is high frequency. Any translational movement or rotation can cause similarity to be very different.
- Histograms: An explanation on Histograms comparison can be found [here](https://mpatacchiola.github.io/blog/2016/11/12/the-simplest-classifier-histogram-intersection.html). This is a great method to use if you are using several masked images.
- - pHash: An explanation on pHash comparison can be found [here](http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html). It is highly recommended to NOT use pHash if you use masked images. It is very inaccurate.
-
-### Show Live Similarity
+ - Perceptual Hash: An explanation on pHash comparison can be found [here](http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html). It is highly recommended to NOT use pHash if you use masked images. It is very inaccurate.
+
+#### Capture Method
+
+- **BitBlt** (fastest, least compatible)
+ A good default fast option. But it cannot properly record OpenGL, Hardware Accelerated or Exclusive Fullscreen windows.
+ The smaller the selected region, the more efficient it is.
+- **Windows Graphics Capture** (fast, most compatible, capped at 60fps)
+ Only available in Windows 10.0.17134 and up.
+ Due to current technical limitations, it requires having at least one audio or video Capture Device connected and enabled. Even if it won't be used.
+ Allows recording UWP apps, Hardware Accelerated and Exclusive Fullscreen windows.
+ Adds a yellow border on Windows 10 (not on Windows 11).
+ Caps at around 60 FPS.
+- **Direct3D Desktop Duplication** (slower, bound to display)
+ Duplicates the desktop using Direct3D.
+ It can record OpenGL and Hardware Accelerated windows.
+ About 10-15x slower than BitBlt. Not affected by window size.
+ overlapping windows will show up and can't record across displays.
+- **Force Full Content Rendering** (very slow, can affect rendering pipeline)
+ Uses BitBlt behind the scene, but passes a special flag to PrintWindow to force rendering the entire desktop.
+ About 10-15x slower than BitBlt based on original window size and can mess up some applications' rendering pipelines.
+- **Video Capture Device**
+ Uses a Video Capture Device, like a webcam, virtual cam, or capture card.
+ There are currently performance issues, but it might be more convenient.
+ If you want to use this with OBS' Virtual Camera, use the [Virtualcam plugin](https://obsproject.com/forum/resources/obs-virtualcam.949/) instead.
+
+#### Capture Device
+
+Select the Video Capture Device that you wanna use if selecting the `Video Capture Device` Capture Method. Will show `[occupied]` if a device is detected but can't be started.
+
+#### Show Live Similarity
- Displays the live similarity between the capture region and the current split image. This number is between 0 and 1, with 1 being a perfect match.
-### Show Highest Similarity
+#### Show Highest Similarity
- Shows the highest similarity between the capture region and current split image.
-### Current Similarity Threshold
+#### Current Similarity Threshold
- When the live similarity goes above this value, the program hits your split hotkey and moves to the next split image.
-### Default Similarity Threshold
+#### Default Similarity Threshold
- This value will be set as the threshold for an image if there is no custom threshold set for that image.
-### Pause Time
+#### Pause Time
- Time in seconds that the program stops comparison after a split. Useful for if you have two of the same split images in a row and want to avoid double-splitting. Also useful for reducing CPU usage.
-### Default Pause Time
+#### Default Pause Time
- This value will be set as the Pause Time for an image if there is no custom Pause Time set for that image.
-### Delay Time
+#### Delay Time
- Time in milliseconds that the program waits before hitting the split hotkey for that specific split.
+#### Dummy splits when undoing / skipping
+
+AutoSplit will group dummy splits together with a real split when undoing/skipping. This basically allows you to tie one or more dummy splits to a real split to keep it as in sync as possible with the real splits in LiveSplit/wsplit. If they are out of sync, you can always use "Previous Image" and "Next Image".
+
+Examples:
+Given these splits: 1 dummy, 2 normal, 3 dummy, 4 dummy, 5 normal, 6 normal.
+
+In this situation you would have only 3 splits in LiveSplit/wsplit (even though there are 6 split images, only 3 are "real" splits). This basically results in 3 groups of splits: 1st split is images 1 and 2. 2nd split is images 3, 4 and 5. 3rd split is image 6.
+
+- If you are in the 1st or 2nd image and press the skip key, it will end up on the 3rd image
+- If you are in the 3rd, 4th or 5th image and press the undo key, it will end up on the 2nd image
+- If you are in the 3rd, 4th or 5th image and press the skip key, it will end up on the 6th image
+- If you are in the 6th image and press the undo key, it will end up on the 5th image
+
+#### Loop Split Images
+
+If this option is enabled, when the last split meets the threshold and splits, AutoSplit will loop back to the first split image and continue comparisons.
+If this option is disabled, when the last split meets the threshold and splits, AutoSplit will stop running comparisons.
+This option does not loop single, specific images. See the Custom Split Image Settings section above for this feature.
+
+#### Auto Start On Reset
+
+If this option is enabled, when the reset hotkey is hit, the reset button is pressed, or the reset split image meets its threshold, AutoSplit will reset and automatically start again back at the first split image.
+If this option is disabled, when the reset hotkey is hit, the reset button is pressed, or the reset split image meets its threshold, AutoSplit will stop running comparisons.
+
### Custom Split Image Settings
- Each split image can have different thresholds, pause times, delay split times, loop amounts, and can be flagged.
@@ -99,18 +162,23 @@ This program can be used to automatically start, split, and reset your preferred
- Custom thresholds are place between parenthesis `()` in the filename. This value will override the default threshold.
- Custom pause times are placed between square brackets `[]` in the filename. This value will override the default pause time.
- Custom delay times are placed between hash signs `##` in the filename. Note that these are in milliseconds. For example, a 10 second split delay would be `#10000#`. You cannot skip or undo splits during split delays.
+- A different comparison method can be specified with their 0-base index between carets `^^`:
+ - `^0^`: L2 Norm
+ - `^1^`: Histogram
+ - `^2^`: Perceptual Hash
- Image loop amounts are placed between at symbols `@@` in the filename. For example, a specific image that you want to split 5 times in a row would be `@5@`. The current loop # is conveniently located beneath the current split image.
- Flags are placed between curly brackets `{}` in the filename. Multiple flags are placed in the same set of curly brackets. Current available flags:
- - {d} dummy split image. When matched, it moves to the next image without hitting your split hotkey.
- - {b} split when similarity goes below the threshold rather than above. When a split image filename has this flag, the split image similarity will go above the threshold, do nothing, and then split the next time the similarity goes below the threshold.
- - {p} pause flag. When a split image filename has this flag, it will hit your pause hotkey rather than your split hokey.
- - A pause flag and a dummy flag `{pd}` cannot be used together
+ - `{d}` dummy split image. When matched, it moves to the next image without hitting your split hotkey.
+ - `{b}` split when similarity goes below the threshold rather than above. When a split image filename has this flag, the split image similarity will go above the threshold, do nothing, and then split the next time the similarity goes below the threshold.
+ - `{p}` pause flag. When a split image filename has this flag, it will hit your pause hotkey rather than your split hokey.
- Filename examples:
- `001_SplitName_(0.9)_[10].png` is a split image with a threshold of 0.9 and a pause time of 10 seconds.
- `002_SplitName_(0.9)_[10]_{d}.png` is the second split image with a threshold of 0.9, pause time of 10, and is a dummy split.
- `003_SplitName_(0.85)_[20]_#3500#.png` is the third split image with a threshold of 0.85, pause time of 20 and has a delay split time of 3.5 seconds.
- `004_SplitName_(0.9)_[10]_#3500#_@3@_{b}.png` is the fourth split image with a threshold of 0.9, pause time of 10 seconds, delay split time of 3.5 seconds, will loop 3 times, and will split when similarity is below the threshold rather than above.
+## Special images
+
### How to Create a Masked Image
Masked images are very useful if only a certain part of the capture region is consistent (for example, consistent text on the screen, but the background is always different). Histogram or L2 norm comparison is recommended if you use any masked images. It is highly recommended that you do NOT use pHash comparison if you use any masked images, as it is very inaccurate.
@@ -127,6 +195,15 @@ You can have one (and only one) image with the keyword `reset` in its name. Auto
The start image is similar to the reset image. You can only have one start image with the keyword `start_auto_splitter`.You can reload the image using the "`Reload Start Image`" button. The pause time is the amount of seconds AutoSplit will wait before checking for the start image once a run ends/is reset. Delay times will be used to delay starting your timer after the threshold is met. If you need to pause comparison for any amount of time after the Start Image, the best option right now is to use a dummy split image `{d}` with a similarity threshold of `(0.00)` and a pause threshold `[]` of however long you need to pause comparison as your first split image. This will trigger the pause immediately after your timer is started.
+### Profiles
+
+- Profiles are saved under `%appdata%\AutoSplit\profiles` and use the extension `.toml`. Profiles can be saved and loaded by using File -> Save Profile As... and File -> Load Profile.
+- The profile contains all of your settings, including information about the capture region.
+- You can save multiple profiles, which is useful if you speedrun multiple games.
+- If you change your display setup (like using a new monitor, or upgrading to Windows 11), you may need to readjust or reselect your Capture Region.
+
+## Timer Integration
+
### Timer Global Hotkeys
- Click "Set Hotkey" on each hotkey to set the hotkeys to AutoSplit. The Start / Split hotkey and Pause hotkey must be the same as the one used in your preferred timer program in order for the splitting/pausing to work properly.
@@ -134,67 +211,32 @@ The start image is similar to the reset image. You can only have one start image
- All of these actions can also be handled by their corresponding buttons.
- Note that pressing your Pause Hotkey does not serve any function in AutoSplit itself and is strictly used for the Pause flag.
-### Group dummy splits when undoing / skipping
-
-If this option is disabled, AutoSplit will not account for dummy splits when undoing/skipping. Meaning it will cycle through the images normally even if they have the dummy flag `{d}` applied to them.
-
-If it is enabled, AutoSplit will group dummy splits together with a real split when undoing/skipping. This basically allows you to tie one or more dummy splits to a real split to keep it as in sync as possible with the real splits in LiveSplit/wsplit.
-
-Examples:
-Given these splits: 1 dummy, 2 normal, 3 dummy, 4 dummy, 5 normal, 6 normal.
-
-In this situation you would have only 3 splits in LiveSplit/wsplit (even though there are 6 split images, only 3 are "real" splits). This basically results in 3 groups of splits: 1st split is images 1 and 2. 2nd split is images 3, 4 and 5. 3rd split is image 6.
-
-- If you are in the 1st or 2nd image and press the skip key, it will end up on the 3rd image
-- If you are in the 3rd, 4th or 5th image and press the undo key, it will end up on the 1st image
-- If you are in the 3rd, 4th or 5th image and press the skip key, it will end up on the 6th image
-- If you are in the 6th image and press the undo key, it will end up on the 3rd image
-
-### Loop Split Images
-
-If this option is enabled, when the last split meets the threshold and splits, AutoSplit will loop back to the first split image and continue comparisons.
-If this option is disabled, when the last split meets the threshold and splits, AutoSplit will stop running comparisons.
-This option does not loop single, specific images. See the Custom Split Image Settings section above for this feature.
-
-### Auto Start On Reset
-
-If this option is enabled, when the reset hotkey is hit, the reset button is pressed, or the reset split image meets its threshold, AutoSplit will reset and automatically start again back at the first split image.
-If this option is disabled, when the reset hotkey is hit, the reset button is pressed, or the reset split image meets its threshold, AutoSplit will stop running comparisons.
-
-### Settings
-
-- Settings files use the extension `.pkl`. Settings files can be saved and opened by using File -> Save Settings As... and File -> Load Settings. A settings file can be loaded upon opening AutoSplit if placed in the same directory as AutoSplit.exe.
-- The settings in the settings file include split image directory, capture region, capture region dimensions, fps limit, threshold and pause time settings, all hotkeys, "Group dummy splits when undoing/skipping" check box, "Loop Split Images" check box, and "Auto Start On Reset" check box.
-- You can save multiple settings files, which is useful if you speedrun multiple games.
-- If you are upgrading to Windows 11, it's possible that save files may not transfer perfectly. You may need to readjust or reselect your Capture Region, for example.
-
-## LiveSplit Integration
+### LiveSplit Integration
The AutoSplit LiveSplit Component will directly connect AutoSplit with LiveSplit. LiveSplit integration is only supported in AutoSplit v1.6.0 or higher. This integration will allow you to:
- Use hotkeys directly from LiveSplit to control AutoSplit and LiveSplit together
-- Load AutoSplit and any AutoSplit settings automatically when opening a LiveSplit layout.
+- Load AutoSplit and any AutoSplit profile automatically when opening a LiveSplit layout.
-### LiveSplit Integration Tutorial
+#### LiveSplit Integration Tutorial
- Click [here](https://github.com/Toufool/LiveSplit.AutoSplitIntegration/raw/main/update/Components/LiveSplit.AutoSplitIntegration.dll) to download the latest component.
- Place the .dll file into your `[...]\LiveSplit\Components` folder.
- Open LiveSplit -> Right Click -> Edit Layout -> Plus Button -> Control -> AutoSplit Integration.
- Click Layout Settings -> AutoSplit Integration
-- Click the Browse buttons to locate your AutoSplit Path (path to AutoSplit.exe) and Settings Path (path to your AutoSplit `.pkl` settings file) respectively.
- - If you have not yet set saved a settings file, you can do so using AutoSplit, and then go back and set your Settings Path.
-- Once set, click OK, and then OK again to close the Layout Editor. Right click LiveSplit -> Save Layout to save your layout. AutoSplit and its settings will now open automatically when opening that LiveSplit Layout `.lsl` file.
-- If you are using any dummy splits, it is recommended that you check the "Group dummy splits when undoing / skipping" checkbox when using LiveSplit integration so that your LiveSplit splits stay in sync with AutoSplit.
+- Click the Browse buttons to locate your AutoSplit Path (path to AutoSplit.exe) and Profile Path (path to your AutoSplit `.toml` profile file) respectively.
+ - If you have not yet set saved a profile, you can do so using AutoSplit, and then go back and set your Settings Path.
+- Once set, click OK, and then OK again to close the Layout Editor. Right click LiveSplit -> Save Layout to save your layout. AutoSplit and your selected profile will now open automatically when opening that LiveSplit Layout `.lsl` file.
## Known Limitations
- For many games, it will be difficult to find a split image for the last split of the run.
- The window of the capture region cannot be minimized.
-- Capturing a hardware accelerated window or using Windows 11 altogether will cause performance drops. But as long as the window you are capturing (not the selected region, but rather the actual window size) is not too large, you should still be able to obtain a Max FPS of over 60.
## Resources
Still need help?
+
- [Open an issue](../../issues)
- Join the [AutoSplit Discord](https://discord.gg/Qcbxv9y)
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000..ee4fd8d7
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,13 @@
+# Security Policy
+
+## Supported Versions
+
+| Version | Supported |
+| ------- | :-------: |
+| main | :white_check_mark: |
+| dev* | :white_check_mark: |
+| everything else | WIP branches, security support may be lacking |
+
+## Reporting a Vulnerability
+
+This is a small project, maintained by a few volunteers of the community. Just open up an issue, be clear, explain why it's a vulnerability as well as your recommendations to fix it. Please provide sources if possible.
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 00000000..b198a748
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,148 @@
+# https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
+[tool.black]
+line-length = 120
+# Auto generated
+force-exclude = "src/gen/.*\\.py$"
+
+# https://github.com/hhatto/autopep8#usage
+# https://github.com/hhatto/autopep8#more-advanced-usage
+[tool.autopep8]
+max_line_length = 120
+recursive = true
+aggressive = 3
+
+# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file
+[tool.pyright]
+typeCheckingMode = "strict"
+# Extra strict
+reportImplicitStringConcatenation="error"
+reportCallInDefaultInitializer="error"
+reportMissingSuperCall="none" # False positives on base classes
+reportPropertyTypeMismatch="error"
+reportUninitializedInstanceVariable="error"
+reportUnnecessaryTypeIgnoreComment="error"
+reportUnusedCallResult="none"
+# Exclude from scanning when running pyright
+exclude = [
+ # Auto generated, produces unecessary `# type: ignore`
+ "src/gen/",
+]
+# Ignore must be specified for Pylance to stop displaying errors
+ignore = [
+ # We expect stub files to be incomplete or contain useless statements
+ "**/*.pyi",
+]
+# Type stubs may not be completable
+reportMissingTypeStubs = "warning"
+# False positives with TYPE_CHECKING
+reportImportCycles = "information"
+# False positives with PyQt .connect. pylint(no-member) works instead
+reportFunctionMemberAccess = "none"
+# Extra runtime safety
+reportUnnecessaryComparison = "warning"
+# Flake8 does a better job
+reportUnusedImport = "none"
+# numpy has way too many complex types that triggers this
+reportUnknownMemberType = "none"
+
+# https://github.com/PyCQA/pylint/blob/main/examples/pylintrc
+# https://pylint.pycqa.org/en/latest/technical_reference/features.html
+[tool.pylint.REPORTS]
+# Just like default but any error, warning or convention will make drop to 9 or less. refactor are worth more
+evaluation = "10.0 - error - warning - convention - ((10 * refactor) / statement) * 10"
+[tool.pylint.MASTER]
+fail-under = 9.0
+# https://pydocbrowser.github.io/pylint/latest/pylint.extensions.html
+# https://pylint.pycqa.org/en/latest/technical_reference/extensions.html
+load-plugins = [
+ "pylint.extensions.bad_builtin",
+ "pylint.extensions.check_elif",
+ "pylint.extensions.comparison_placement",
+ "pylint.extensions.confusing_elif",
+ "pylint.extensions.consider_ternary_expression",
+ "pylint.extensions.empty_comment",
+ "pylint.extensions.emptystring",
+ "pylint.extensions.for_any_all",
+ "pylint.extensions.eq_without_hash",
+ "pylint.extensions.mccabe",
+ "pylint.extensions.no_self_use",
+ "pylint.extensions.overlapping_exceptions",
+ "pylint.extensions.private_import",
+ "pylint.extensions.redefined_loop_name",
+ "pylint.extensions.redefined_variable_type",
+ "pylint.extensions.set_membership",
+ "pylint.extensions.typing",
+ # TODO: Maybe later
+ # "pylint.extensions.docparams",
+ # Not wanted/needed
+ # "pylint.extensions.broad_try_clause",
+ # "pylint.extensions.code_style",
+ # "pylint.extensions.comparetozero",
+ # "pylint.extensions.docstyle",
+ # "pylint.extensions.while_used",
+]
+ignore-paths = [
+ # Auto generated
+ "^src/gen/.*$",
+ # We expect stub files to be incomplete or contain useless statements
+ "^.*.pyi$",
+]
+extension-pkg-allow-list = ["PyQt6", "PySide6", "win32ui"]
+
+[tool.pylint.FORMAT]
+max-line-length = 120
+
+[tool.pylint.DESIGN]
+# Same as SonarLint
+max-args = 7
+# Arbitrary to 2 bytes
+max-attributes = 15
+max-locals = 15
+
+[tool.pylint.'MESSAGES CONTROL']
+# Same as SonarLint
+max-complexity = 15
+# At least same as max-complexity
+max-branches = 15
+# https://github.com/PyCQA/pep8-naming/issues/164
+# OR doesn't fit CaptureMethodMeta
+valid-classmethod-first-arg = "self"
+# https://pylint.pycqa.org/en/latest/user_guide/options.html#naming-styles
+module-naming-style = "any"
+# Can't make private class with PascalCase
+class-rgx = "_?_?[a-zA-Z]+?$"
+good-names = [
+ # PyQt methods
+ "closeEvent", "paintEvent", "keyPressEvent", "mousePressEvent", "mouseMoveEvent", "mouseReleaseEvent",
+ # https://github.com/PyCQA/pylint/issues/2018
+ "id", "x", "y", "a0", "i", "t0", "t1"]
+disable = [
+ # No need to mention the fixmes
+ "fixme",
+ "missing-docstring",
+ # Already taken care of by Flake8 and isort
+ "ungrouped-imports",
+ "unused-import",
+ "wrong-import-order",
+ "wrong-import-position",
+ # Already taken care of and grayed out. Also conflicts with Pylance reportIncompatibleMethodOverride
+ "unused-argument",
+ # Only reports a single instance. Pyright does a better job anyway
+ "cyclic-import",
+ # Doesn't work with local imports
+ "import-error",
+ # Similar lines in 2 files, doesn't really work
+ "R0801",
+]
+
+[tool.pylint.TYPECHECK]
+generated-members = [
+ # https://github.com/PyCQA/pylint/issues/4987
+ "cv2",
+ # https://github.com/mhammond/pywin32/issues/1913
+ "pywintypes.error",
+]
+
+[tool.isort]
+line_length = 120
+combine_as_imports = true
diff --git a/res/about.ui b/res/about.ui
index 1d833949..04ff482c 100644
--- a/res/about.ui
+++ b/res/about.ui
@@ -1,7 +1,7 @@
- aboutAutoSplitWidget
-
+ AboutAutoSplitWidget
+
0
@@ -34,7 +34,7 @@
:/resources/icon.ico:/resources/icon.ico
-
+
180
@@ -47,12 +47,12 @@
OK
-
+
10
44
- 161
+ 241
32
@@ -60,12 +60,12 @@
<html><head/><body><p>Created by <a href="https://twitter.com/toufool"><span style=" text-decoration: underline; color:#0000ff;">Toufool</span></a> and <a href="https://twitter.com/faschz"><span style=" text-decoration: underline; color:#0000ff;">Faschz</span></a><br/>Maintained by <a href="https://twitter.com/Avasam06"><span style=" text-decoration: underline; color:#0000ff;">Avasam</span></a></p></body></html>
-
+
10
21
- 161
+ 241
16
@@ -73,24 +73,25 @@
Version:
-
+
- 30
- 95
- 204
- 32
+ 10
+ 90
+ 241
+ 41
- If you enjoy using this program, please
-consider donating. Thank you!
+ If you enjoy using this program,
+please consider donating.
+Thank you!
Qt::AlignCenter
-
+
60
@@ -100,34 +101,49 @@ consider donating. Thank you!
- <html><head/><body><p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=BYRHQG69YRHBA&item_name=AutoSplit+development&currency_code=USD&source=url"><img src=":/resources/btn_donateCC_LG.png"/></a></p></body></html>
+
+
+
+ :/resources/btn_donateCC_LG.png
Qt::AlignCenter
-
+
- 190
+ 181
17
- 62
- 71
+ 64
+ 64
- <html><head/><body><p><img src=":/resources/icon.ico"/></p></body></html>
+
+
+
+ :/resources/icon.ico
+
+
+ true
+ ok_button
+ donate_text_label
+ donate_button_label
+ icon_label
+ version_label
+ created_by_label
- okButton
+ ok_button
clicked()
- aboutAutoSplitWidget
+ AboutAutoSplitWidget
close()
diff --git a/res/design.ui b/res/design.ui
index 1e74b9d8..a34632df 100644
--- a/res/design.ui
+++ b/res/design.ui
@@ -6,8 +6,8 @@
0
0
- 632
- 490
+ 777
+ 424
@@ -18,14 +18,14 @@
- 632
- 490
+ 777
+ 424
- 632
- 490
+ 777
+ 424
@@ -40,60 +40,12 @@
:/resources/icon.ico:/resources/icon.ico
-
-
-
-
- Qt::LeftToRight
-
-
-
-
-
- 20
- 12
- 98
- 16
-
-
-
- Split Image Folder:
-
-
-
-
-
- 130
- 10
- 412
- 22
-
-
-
- true
-
-
-
-
-
- 540
- 9
- 75
- 24
-
-
-
- Qt::NoFocus
-
-
- Browse...
-
-
-
+
+
- 25
- 145
+ 30
+ 143
7
16
@@ -102,33 +54,11 @@
X
-
-
- true
-
-
-
- 120
- 252
- 129
- 20
-
-
-
- Live Capture Region
-
-
- true
-
-
- false
-
-
-
+
- 5
- 70
+ 10
+ 67
101
23
@@ -140,45 +70,13 @@
Select Region
-
-
-
- 7
- 410
- 151
- 16
-
-
-
- Default similarity threshold:
-
-
-
-
-
- 155
- 408
- 61
- 22
-
-
-
- 1.000000000000000
-
-
- 0.010000000000000
-
-
- 0.900000000000000
-
-
-
+
- 500
- 425
+ 650
+ 369
121
- 31
+ 27
@@ -188,13 +86,16 @@
Start Auto Splitter
-
+
+
+ false
+
- 500
- 390
+ 650
+ 339
121
- 31
+ 27
@@ -204,387 +105,97 @@
Reset
-
-
-
- 494
- 250
- 64
- 24
-
-
-
- Qt::NoFocus
-
-
- Undo Split
-
-
-
-
-
- 560
- 250
- 61
- 24
-
-
-
- Qt::NoFocus
-
-
- Skip Split
-
-
-
-
-
- 7
- 439
- 131
- 16
-
-
-
- Default pause time (sec):
+
+
+ false
-
-
- 5
- 225
- 53
- 21
+ 650
+ 310
+ 59
+ 27
Qt::NoFocus
- Max FPS
-
-
-
-
-
- 87
- 225
- 20
- 20
-
-
-
- FPS
-
-
-
-
- true
-
-
-
- 7
- 323
- 124
- 20
-
-
-
- Show live similarity
-
-
- true
-
-
- false
+ Undo
-
+
- true
-
-
-
- 7
- 350
- 145
- 20
-
-
-
- Show highest similarity
-
-
- true
-
-
false
-
-
-
-
- 171
- 326
- 46
- 16
-
-
-
-
-
-
-
-
-
- 171
- 352
- 46
- 16
-
-
-
-
-
-
-
-
-
- 230
- 317
- 58
- 16
-
-
-
- Start / Split
-
-
-
-
-
- 230
- 341
- 28
- 16
-
-
-
- Reset
-
-
-
-
-
- 230
- 367
- 48
- 16
-
-
-
- Skip Split
-
-
-
-
-
- 230
- 393
- 55
- 16
-
-
-
- Undo Split
-
-
-
-
-
- 300
- 314
- 81
- 20
-
-
-
- true
-
-
-
-
-
- 300
- 391
- 81
- 20
-
-
-
- Qt::StrongFocus
-
-
- true
-
-
-
-
-
- 300
- 365
- 81
- 20
-
-
-
- true
-
-
-
-
-
- 300
- 339
- 81
- 20
-
-
-
- true
-
-
-
-
-
- 390
- 314
- 81
- 21
-
-
-
- Qt::NoFocus
-
-
- Set Hotkey
-
-
-
- 390
- 339
- 81
- 21
+ 712
+ 310
+ 59
+ 27
Qt::NoFocus
- Set Hotkey
+ Skip
-
+
- 390
- 365
- 81
- 21
+ 10
+ 253
+ 53
+ 23
Qt::NoFocus
-
- Set Hotkey
-
-
-
-
-
- 390
- 391
- 81
- 21
-
-
-
- Qt::NoFocus
+
+ calculate the average max FPS of the set capture region
- Set Hotkey
-
-
-
-
-
- 220
- 296
- 2
- 163
-
-
-
- QFrame::Plain
-
-
- 1
-
-
- Qt::Vertical
+ Max FPS
-
+
- 230
- 291
- 251
+ 92
+ 254
+ 20
20
- Timer Global Hotkeys
-
-
- Qt::AlignCenter
-
-
-
-
-
- 490
- 296
- 2
- 163
-
-
-
- QFrame::Plain
-
-
- 1
-
-
- Qt::Vertical
+ FPS
-
+
120
- 70
- 240
- 180
+ 67
+ 320
+ 240
QFrame::Box
+
+ QFrame::Plain
+
+
+ 1
+
+
+ 0
+
@@ -592,13 +203,13 @@
Qt::AlignCenter
-
+
- 380
- 70
- 240
- 180
+ 449
+ 67
+ 320
+ 240
@@ -611,24 +222,27 @@
Qt::AlignCenter
-
+
- 450
- 50
- 102
- 16
+ 449
+ 31
+ 318
+ 20
- Current Split Image
+ Current Image
+
+
+ Qt::AlignCenter
-
+
- 12
- 185
+ 17
+ 183
33
16
@@ -637,11 +251,11 @@
Width
-
+
- 66
- 185
+ 70
+ 183
41
16
@@ -650,11 +264,11 @@
Height
-
+
- 58
- 225
+ 65
+ 254
26
20
@@ -663,15 +277,18 @@
-
+
- 6
+ 11
200
44
- 22
+ 24
+
+ QAbstractSpinBox::CorrectToNearestValue
+
1
@@ -682,15 +299,18 @@
640
-
+
- 62
+ 66
200
44
- 22
+ 24
+
+ QAbstractSpinBox::CorrectToNearestValue
+
1
@@ -701,83 +321,45 @@
480
-
+
- 200
- 50
- 82
- 16
+ 120
+ 31
+ 318
+ 20
Capture Region
-
-
-
-
- 8
- 252
- 51
- 16
-
-
-
- FPS Limit:
-
-
-
-
-
- 62
- 250
- 44
- 22
-
-
-
-
-
-
- 0
-
-
- 30.000000000000000
-
-
- 5000.000000000000000
-
-
- 1.000000000000000
-
-
- 60.000000000000000
+
+ Qt::AlignCenter
-
+
- 380
- 270
- 241
+ 477
+ 49
+ 264
20
-
+ -
Qt::AlignCenter
-
+
- 260
- 250
+ 10
+ 227
101
- 24
+ 23
@@ -787,21 +369,21 @@
Take Screenshot
-
+
- 6
+ 11
160
44
- 22
+ 24
-
- false
-
QAbstractSpinBox::UpDownArrows
+
+ QAbstractSpinBox::CorrectToNearestValue
+
0
@@ -815,20 +397,17 @@
0
-
+
- 62
+ 66
160
44
- 22
+ 24
-
- false
-
-
- QAbstractSpinBox::UpDownArrows
+
+ QAbstractSpinBox::CorrectToNearestValue
0
@@ -840,11 +419,11 @@
0
-
+
- 81
- 145
+ 85
+ 143
7
16
@@ -853,68 +432,11 @@
Y
-
-
-
- 125
- 296
- 91
- 22
-
-
- -
-
- L2 Norm
-
-
- -
-
- Histograms
-
-
- -
-
- pHash
-
-
-
-
-
-
- 155
- 437
- 61
- 22
-
-
-
- 999999999.000000000000000
-
-
- 1.000000000000000
-
-
- 10.000000000000000
-
-
-
-
-
- 7
- 298
- 110
- 16
-
-
-
- Comparison Method
-
-
-
+
- 5
- 95
+ 10
+ 119
101
23
@@ -922,31 +444,18 @@
Qt::NoFocus
-
- Align Region
-
-
-
-
-
- 230
- 442
- 261
- 20
-
+
+ Align the capture region using a reference image
- Group dummy splits when undoing/skipping
-
-
- false
+ Align Region
-
+
- 5
- 120
+ 10
+ 93
101
23
@@ -958,112 +467,335 @@
Select Window
-
+
- 379
- 252
- 113
- 20
+ 696
+ 5
+ 75
+ 24
+
+ Qt::NoFocus
+
- Image Loop:
+ Browse...
-
+
- 230
- 418
- 31
+ 10
+ 9
+ 98
16
- Pause
+ Split Image Folder:
-
+
- 300
- 416
- 81
- 20
+ 119
+ 6
+ 574
+ 22
-
- Qt::StrongFocus
-
true
-
+
- 390
- 416
- 81
- 21
+ 120
+ 49
+ 318
+ 20
-
- Qt::NoFocus
-
- Set Hotkey
+ -
-
-
-
- true
+
+ Qt::AlignCenter
+
+
- 500
- 340
- 117
+ 451
+ 313
+ 67
20
- Loop Split Images
-
-
- false
-
-
- false
+ Image Loop:
-
+
- 500
- 360
- 126
- 20
+ 120
+ 312
+ 321
+ 84
-
- Auto Start On Reset
-
-
- false
+
+ Similarity Viewer
-
- false
+
+ Qt::AlignCenter
+
+
+
+ 133
+ 22
+ 57
+ 16
+
+
+
+ Live
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 197
+ 22
+ 57
+ 16
+
+
+
+ Highest
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 261
+ 22
+ 56
+ 16
+
+
+
+ Threshold
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 0
+ 39
+ 322
+ 3
+
+
+
+ Qt::Horizontal
+
+
+
+
+
+ 10
+ 42
+ 111
+ 16
+
+
+
+ Current Image
+
+
+
+
+
+ 10
+ 64
+ 111
+ 16
+
+
+
+ Reset Image
+
+
+
+
+
+ 0
+ 61
+ 322
+ 3
+
+
+
+ Qt::Horizontal
+
+
+
+
+
+ 129
+ 20
+ 3
+ 62
+
+
+
+ Qt::Vertical
+
+
+
+
+
+ 193
+ 20
+ 3
+ 95
+
+
+
+ Qt::Vertical
+
+
+
+
+
+ 257
+ 20
+ 3
+ 95
+
+
+
+ Qt::Vertical
+
+
+
+
+
+ 133
+ 43
+ 57
+ 16
+
+
+
+ -
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 197
+ 43
+ 57
+ 16
+
+
+
+ -
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 260
+ 43
+ 57
+ 16
+
+
+
+ -
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 133
+ 64
+ 57
+ 16
+
+
+
+ -
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 197
+ 64
+ 57
+ 16
+
+
+
+ -
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 260
+ 64
+ 57
+ 16
+
+
+
+ -
+
+
+ Qt::AlignCenter
+
+
-
+
- 500
- 302
+ 450
+ 369
121
- 31
+ 27
@@ -1073,209 +805,250 @@
Reload Start Image
-
+
- 120
- 270
- 241
+ 449
+ 344
+ 101
16
- Start image:
+ Start Image Status:
-
+
- 7
- 380
- 151
+ 560
+ 344
+ 98
16
- Current similarity threshold:
+ status
-
+
- 171
- 380
- 46
- 16
+ 520
+ 313
+ 131
+ 20
-
+ N/A
+
+
+
+
+ false
+
+
+
+ 448
+ 49
+ 27
+ 18
+
+
+
+ Qt::NoFocus
+
+
+ Previous image
+
+
+ <
- splitimagefolderLabel
- splitimagefolderLineEdit
- browseButton
- xLabel
- liveimageCheckBox
- selectregionButton
- similaritythresholdLabel
- similaritythresholdDoubleSpinBox
- startautosplitterButton
- resetButton
- undosplitButton
- skipsplitButton
- pauseLabel
- checkfpsButton
- fpsLabel
- showlivesimilarityCheckBox
- showhighestsimilarityCheckBox
- livesimilarityLabel
- highestsimilarityLabel
- splitLabel
- resetLabel
- skiptsplitLabel
- undosplitLabel
- splitLineEdit
- undosplitLineEdit
- skipsplitLineEdit
- resetLineEdit
- setsplithotkeyButton
- setresethotkeyButton
- setskipsplithotkeyButton
- setundosplithotkeyButton
- line_left
- timerglobalhotkeysLabel
- line_right
- currentsplitimageLabel
- liveImage
- currentSplitImage
- widthLabel
- heightLabel
- fpsvalueLabel
- widthSpinBox
- heightSpinBox
- captureregionLabel
- fpslimitLabel
- fpslimitSpinBox
- currentsplitimagefileLabel
- takescreenshotButton
- xSpinBox
- ySpinBox
- yLabel
- comparisonmethodComboBox
- pauseDoubleSpinBox
- comparisonmethodLabel
- alignregionButton
- groupDummySplitsCheckBox
- selectwindowButton
- imageloopLabel
- pausehotkeyLabel
- pausehotkeyLineEdit
- setpausehotkeyButton
- loopCheckBox
- autostartonresetCheckBox
- startImageReloadButton
- startImageLabel
- currentsimilaritythresholdLabel
- currentsimilaritythresholdnumberLabel
+
+
+ false
+
+
+
+ 743
+ 49
+ 27
+ 18
+
+
+
+ Qt::NoFocus
+
+
+ Next image
+
+
+ >
+
+
+ x_label
+ select_region_button
+ start_auto_splitter_button
+ reset_button
+ undo_split_button
+ skip_split_button
+ check_fps_button
+ fps_label
+ current_image_label
+ live_image
+ current_split_image
+ width_label
+ height_label
+ fps_value_label
+ width_spinbox
+ height_spinbox
+ capture_region_label
+ current_image_file_label
+ take_screenshot_button
+ x_spinbox
+ y_spinbox
+ y_label
+ align_region_button
+ select_window_button
+ browse_button
+ split_image_folder_label
+ split_image_folder_input
+ capture_region_window_label
+ image_loop_label
+ similarity_viewer_groupbox
+ reload_start_image_button
+ start_image_status_label
+ start_image_status_value_label
+ image_loop_value_label
+ previous_image_button
+ next_image_button
-