├── .gitignore
├── .vs
├── Screenshots
│ └── v16
│ │ └── .suo
├── VSWorkspaceState.json
├── slnx.sqlite
└── 小小截图OCR
│ └── v16
│ └── .suo
├── README.md
├── imgs
├── 1.png
├── 2.png
└── 3.png
├── packages
├── Newtonsoft.Json.11.0.1
│ ├── .signature.p7s
│ ├── LICENSE.md
│ ├── Newtonsoft.Json.11.0.1.nupkg
│ └── lib
│ │ ├── net20
│ │ ├── Newtonsoft.Json.dll
│ │ └── Newtonsoft.Json.xml
│ │ ├── net35
│ │ ├── Newtonsoft.Json.dll
│ │ └── Newtonsoft.Json.xml
│ │ ├── net40
│ │ ├── Newtonsoft.Json.dll
│ │ └── Newtonsoft.Json.xml
│ │ ├── net45
│ │ ├── Newtonsoft.Json.dll
│ │ └── Newtonsoft.Json.xml
│ │ ├── netstandard1.0
│ │ ├── Newtonsoft.Json.dll
│ │ └── Newtonsoft.Json.xml
│ │ ├── netstandard1.3
│ │ ├── Newtonsoft.Json.dll
│ │ └── Newtonsoft.Json.xml
│ │ ├── netstandard2.0
│ │ ├── Newtonsoft.Json.dll
│ │ └── Newtonsoft.Json.xml
│ │ ├── portable-net40+sl5+win8+wp8+wpa81
│ │ ├── Newtonsoft.Json.dll
│ │ └── Newtonsoft.Json.xml
│ │ └── portable-net45+win8+wp8+wpa81
│ │ ├── Newtonsoft.Json.dll
│ │ └── Newtonsoft.Json.xml
├── System.Text.Encodings.Web.4.5.1
│ ├── .signature.p7s
│ ├── LICENSE.TXT
│ ├── System.Text.Encodings.Web.4.5.1.nupkg
│ ├── THIRD-PARTY-NOTICES.TXT
│ ├── lib
│ │ ├── netstandard1.0
│ │ │ ├── System.Text.Encodings.Web.dll
│ │ │ └── System.Text.Encodings.Web.xml
│ │ └── netstandard2.0
│ │ │ ├── System.Text.Encodings.Web.dll
│ │ │ └── System.Text.Encodings.Web.xml
│ ├── useSharedDesignerContext.txt
│ └── version.txt
├── System.ValueTuple.4.3.0
│ ├── .signature.p7s
│ ├── System.ValueTuple.4.3.0.nupkg
│ ├── ThirdPartyNotices.txt
│ ├── dotnet_library_license.txt
│ └── lib
│ │ ├── netstandard1.0
│ │ ├── .xml
│ │ └── System.ValueTuple.dll
│ │ └── portable-net40+sl4+win8+wp8
│ │ ├── .xml
│ │ └── System.ValueTuple.dll
└── TencentCloudSDK.3.0.308
│ ├── .signature.p7s
│ ├── TencentCloudSDK.3.0.308.nupkg
│ └── lib
│ ├── net45
│ └── TencentCloud.dll
│ └── netstandard2.0
│ └── TencentCloud.dll
├── 小小截图
└── 小小截图.vdproj
├── 小小截图OCR.sln
└── 小小截图OCR
├── AcceptSelectEventArgs.cs
├── AcceptSelectHandler.cs
├── App.config
├── App.xaml
├── App.xaml.cs
├── Base64.cs
├── Command.cs
├── CursorInfo.cs
├── HotKey.cs
├── HotKeyRegisterFailException.cs
├── ISelector.cs
├── ImageEditor.cs
├── Keys.cs
├── Lisp.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── OcrTools.cs
├── PixelObserver.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── SelectState.cs
├── SelectorEventRegister.cs
├── TestWindow.xaml
├── TestWindow.xaml.cs
├── Themes
└── Generic.xaml
├── Tip.cs
├── Tool.cs
├── ai41s-wdwmm-002.ico
├── config.ini
├── obj
├── Debug
│ ├── .NETFramework,Version=v4.6.1.AssemblyAttributes.cs
│ ├── .NETFramework,Version=v4.7.1.AssemblyAttributes.cs
│ ├── App.g.cs
│ ├── App.g.i.cs
│ ├── DesignTimeResolveAssemblyReferences.cache
│ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ ├── GeneratedInternalTypeHelper.g.cs
│ ├── GeneratedInternalTypeHelper.g.i.cs
│ ├── Interop.IWshRuntimeLibrary.dll
│ ├── MainWindow.baml
│ ├── MainWindow.g.cs
│ ├── MainWindow.g.i.cs
│ ├── TempPE
│ │ └── Properties.Resources.Designer.cs.dll
│ ├── TestWindow.baml
│ ├── TestWindow.g.cs
│ ├── TestWindow.g.i.cs
│ ├── Themes
│ │ └── Generic.baml
│ ├── Wpf截图工具.csproj.AssemblyReference.cache
│ ├── Wpf截图工具_MarkupCompile.cache
│ ├── Wpf截图工具_MarkupCompile.i.cache
│ ├── Wpf截图工具_MarkupCompile.lref
│ ├── 小小截图OCR.Properties.Resources.resources
│ ├── 小小截图OCR.csproj.AssemblyReference.cache
│ ├── 小小截图OCR.csproj.CopyComplete
│ ├── 小小截图OCR.csproj.CoreCompileInputs.cache
│ ├── 小小截图OCR.csproj.FileListAbsolute.txt
│ ├── 小小截图OCR.csproj.GenerateResource.cache
│ ├── 小小截图OCR.csproj.ResolveComReference.cache
│ ├── 小小截图OCR.exe
│ ├── 小小截图OCR.exe.config
│ ├── 小小截图OCR.g.resources
│ ├── 小小截图OCR.pdb
│ ├── 小小截图OCR_Content.g.cs
│ ├── 小小截图OCR_Content.g.i.cs
│ ├── 小小截图OCR_MarkupCompile.cache
│ ├── 小小截图OCR_MarkupCompile.i.cache
│ └── 小小截图OCR_MarkupCompile.lref
└── Release
│ ├── .NETFramework,Version=v4.6.1.AssemblyAttributes.cs
│ ├── .NETFramework,Version=v4.7.1.AssemblyAttributes.cs
│ ├── App.g.cs
│ ├── App.g.i.cs
│ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ ├── GeneratedInternalTypeHelper.g.cs
│ ├── GeneratedInternalTypeHelper.g.i.cs
│ ├── Interop.IWshRuntimeLibrary.dll
│ ├── MainWindow.baml
│ ├── MainWindow.g.cs
│ ├── MainWindow.g.i.cs
│ ├── TempPE
│ └── Properties.Resources.Designer.cs.dll
│ ├── TestWindow.baml
│ ├── TestWindow.g.cs
│ ├── TestWindow.g.i.cs
│ ├── Themes
│ └── Generic.baml
│ ├── Wpf截图工具_MarkupCompile.cache
│ ├── Wpf截图工具_MarkupCompile.lref
│ ├── 小小截图OCR.Properties.Resources.resources
│ ├── 小小截图OCR.csproj.CopyComplete
│ ├── 小小截图OCR.csproj.CoreCompileInputs.cache
│ ├── 小小截图OCR.csproj.FileListAbsolute.txt
│ ├── 小小截图OCR.csproj.GenerateResource.cache
│ ├── 小小截图OCR.csproj.ResolveComReference.cache
│ ├── 小小截图OCR.exe
│ ├── 小小截图OCR.exe.config
│ ├── 小小截图OCR.g.resources
│ ├── 小小截图OCR.pdb
│ ├── 小小截图OCR_Content.g.cs
│ ├── 小小截图OCR_Content.g.i.cs
│ ├── 小小截图OCR_MarkupCompile.cache
│ └── 小小截图OCR_MarkupCompile.lref
├── packages.config
├── temp.txt
├── 小小截图OCR.csproj
└── 小小截图OCR.csproj.user
/.gitignore:
--------------------------------------------------------------------------------
1 | 小小截图/Debug/*
2 | 小小截图/Release/*
3 | 小小截图OCR/bin/*
--------------------------------------------------------------------------------
/.vs/Screenshots/v16/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/.vs/Screenshots/v16/.suo
--------------------------------------------------------------------------------
/.vs/VSWorkspaceState.json:
--------------------------------------------------------------------------------
1 | {
2 | "ExpandedNodes": [
3 | ""
4 | ],
5 | "SelectedNode": "\\C:\\Users\\lei\\Source\\Repos\\Screenshots",
6 | "PreviewInSolutionExplorer": false
7 | }
--------------------------------------------------------------------------------
/.vs/slnx.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/.vs/slnx.sqlite
--------------------------------------------------------------------------------
/.vs/小小截图OCR/v16/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/.vs/小小截图OCR/v16/.suo
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## windows轻量级工具 = 截图 + 文字识别 + 取色器
2 |
3 | ### 特点:
4 | 1. 轻量级,内存占用仅20MB,不截图时CPU占用为0%,截图时占用在1~3%;
5 | 2. **用户无感知(设计初衷)**,
6 | * 截图功能不管是QQ还是微信都有,但是每次截图或者文字识别都要打开QQ,然后登录,然后等消息和弹窗弹弹弹,然后再开始截图,十几秒过去了,体验极差,而该软件只需要瞬间;
7 | * 无窗口,无托盘,不会占用屏幕任何一块地方,用户不必在意或者知道它的存在,只需像系统本来就自带的软件使用即可(设计目的亦如此,像使用系统原生功能一样使用它);
8 | 3. 增加了取色器功能,取色器也是前端和UI设计时常用的功能;
9 |
10 |
11 |
12 | ### 功能说明:
13 |
14 | ### 唤出快捷键为 alt + a
15 |
16 | 
17 |
18 | #### 1.快捷截图
19 |
20 | * 选择完截图区域后,双击所选截图区域的左上角区域将**图片复制到剪贴板**
21 | * 双击所截图区域的左下角区域将图片**保存至桌面**;
22 |
23 | #### 2.文字识别
24 |
25 | * 双击所选截图区域的右上角区域进行**通用文字识别**
26 | * 双击所选截图区域的右下角区域进行**手写体文字识别**
27 |
28 | #### 3.取色
29 |
30 | * 使用alt + a唤出截图软件后,鼠标移动的位置会自动显示rgb值
31 |
32 | #### 4.取消截图or重新选择截图区域
33 | * 在你当前选择的截图区域外单机右键即可重新选择截图区域
34 | * 再单击右键即可退出截图;
35 |
36 |
37 |
38 | ### 使用说明
39 | ===========================**直接使用**===========================
40 |
41 | 1. 从Release中下载msi文件,双击安装;
42 |
43 | 
44 |
45 | 2. 安装完成后,进入你的安装目录(默认为:C:\Program Files (x86)\Default Company Name\小小截图\),将config.ini文件内的密钥改为你自己的(须在[腾讯云创建密钥并开通OCR服务](https://cloud.tencent.com/document/product/866/34681#null),每月1000免费额度);
46 |
47 | 
48 |
49 | **注意等号两侧各有一个空格分隔;**
50 |
51 |
52 |
53 | 3. 启动程序(之后每次开机会自启,无需手动);
54 |
55 | ===========================**自己编译**===========================
56 | 1. .net framwork 版本为4.7.1,自行下载安装;
57 | 2. clone项目,用vs2019打开sln文件导入项目;
58 | 3. 右键*小小截图*项目,重新生成即可;
--------------------------------------------------------------------------------
/imgs/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/imgs/1.png
--------------------------------------------------------------------------------
/imgs/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/imgs/2.png
--------------------------------------------------------------------------------
/imgs/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/imgs/3.png
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/Newtonsoft.Json.11.0.1/.signature.p7s
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2007 James Newton-King
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/Newtonsoft.Json.11.0.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/Newtonsoft.Json.11.0.1/Newtonsoft.Json.11.0.1.nupkg
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/lib/net20/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/Newtonsoft.Json.11.0.1/lib/net20/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/lib/net35/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/Newtonsoft.Json.11.0.1/lib/net35/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/lib/net40/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/Newtonsoft.Json.11.0.1/lib/net40/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/lib/net45/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/Newtonsoft.Json.11.0.1/lib/net45/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/lib/netstandard1.0/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/Newtonsoft.Json.11.0.1/lib/netstandard1.0/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/lib/netstandard1.3/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/Newtonsoft.Json.11.0.1/lib/netstandard1.3/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/lib/netstandard2.0/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/Newtonsoft.Json.11.0.1/lib/netstandard2.0/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/Newtonsoft.Json.11.0.1/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.11.0.1/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/Newtonsoft.Json.11.0.1/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/packages/System.Text.Encodings.Web.4.5.1/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/System.Text.Encodings.Web.4.5.1/.signature.p7s
--------------------------------------------------------------------------------
/packages/System.Text.Encodings.Web.4.5.1/LICENSE.TXT:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) .NET Foundation and Contributors
4 |
5 | All rights reserved.
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 |
--------------------------------------------------------------------------------
/packages/System.Text.Encodings.Web.4.5.1/System.Text.Encodings.Web.4.5.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/System.Text.Encodings.Web.4.5.1/System.Text.Encodings.Web.4.5.1.nupkg
--------------------------------------------------------------------------------
/packages/System.Text.Encodings.Web.4.5.1/lib/netstandard1.0/System.Text.Encodings.Web.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/System.Text.Encodings.Web.4.5.1/lib/netstandard1.0/System.Text.Encodings.Web.dll
--------------------------------------------------------------------------------
/packages/System.Text.Encodings.Web.4.5.1/lib/netstandard2.0/System.Text.Encodings.Web.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/System.Text.Encodings.Web.4.5.1/lib/netstandard2.0/System.Text.Encodings.Web.dll
--------------------------------------------------------------------------------
/packages/System.Text.Encodings.Web.4.5.1/useSharedDesignerContext.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/System.Text.Encodings.Web.4.5.1/useSharedDesignerContext.txt
--------------------------------------------------------------------------------
/packages/System.Text.Encodings.Web.4.5.1/version.txt:
--------------------------------------------------------------------------------
1 | 627093c87fea3d92b28d0deb53d1259e79b45088
2 |
--------------------------------------------------------------------------------
/packages/System.ValueTuple.4.3.0/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/System.ValueTuple.4.3.0/.signature.p7s
--------------------------------------------------------------------------------
/packages/System.ValueTuple.4.3.0/System.ValueTuple.4.3.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/System.ValueTuple.4.3.0/System.ValueTuple.4.3.0.nupkg
--------------------------------------------------------------------------------
/packages/System.ValueTuple.4.3.0/ThirdPartyNotices.txt:
--------------------------------------------------------------------------------
1 | This Microsoft .NET Library may incorporate components from the projects listed
2 | below. Microsoft licenses these components under the Microsoft .NET Library
3 | software license terms. The original copyright notices and the licenses under
4 | which Microsoft received such components are set forth below for informational
5 | purposes only. Microsoft reserves all rights not expressly granted herein,
6 | whether by implication, estoppel or otherwise.
7 |
8 | 1. .NET Core (https://github.com/dotnet/core/)
9 |
10 | .NET Core
11 | Copyright (c) .NET Foundation and Contributors
12 |
13 | The MIT License (MIT)
14 |
15 | Permission is hereby granted, free of charge, to any person obtaining a copy
16 | of this software and associated documentation files (the "Software"), to deal
17 | in the Software without restriction, including without limitation the rights
18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19 | copies of the Software, and to permit persons to whom the Software is
20 | furnished to do so, subject to the following conditions:
21 |
22 | The above copyright notice and this permission notice shall be included in all
23 | copies or substantial portions of the Software.
24 |
25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 | SOFTWARE.
--------------------------------------------------------------------------------
/packages/System.ValueTuple.4.3.0/lib/netstandard1.0/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/System.ValueTuple.4.3.0/lib/netstandard1.0/System.ValueTuple.dll
--------------------------------------------------------------------------------
/packages/System.ValueTuple.4.3.0/lib/portable-net40+sl4+win8+wp8/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/System.ValueTuple.4.3.0/lib/portable-net40+sl4+win8+wp8/System.ValueTuple.dll
--------------------------------------------------------------------------------
/packages/TencentCloudSDK.3.0.308/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/TencentCloudSDK.3.0.308/.signature.p7s
--------------------------------------------------------------------------------
/packages/TencentCloudSDK.3.0.308/TencentCloudSDK.3.0.308.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/TencentCloudSDK.3.0.308/TencentCloudSDK.3.0.308.nupkg
--------------------------------------------------------------------------------
/packages/TencentCloudSDK.3.0.308/lib/net45/TencentCloud.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/TencentCloudSDK.3.0.308/lib/net45/TencentCloud.dll
--------------------------------------------------------------------------------
/packages/TencentCloudSDK.3.0.308/lib/netstandard2.0/TencentCloud.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/THMAIL/xiaoxiao-screenshots-ocr/9633ec9c5e45f18aad993e227bf80c5e353a4d94/packages/TencentCloudSDK.3.0.308/lib/netstandard2.0/TencentCloud.dll
--------------------------------------------------------------------------------
/小小截图OCR.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.31410.357
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "小小截图OCR", "小小截图OCR\小小截图OCR.csproj", "{5D5AA8CE-7B19-4850-87B8-F442F09C0BA1}"
7 | EndProject
8 | Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "小小截图", "小小截图\小小截图.vdproj", "{FC20D29E-9C68-4F04-9B00-979EAECD5E5F}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {5D5AA8CE-7B19-4850-87B8-F442F09C0BA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {5D5AA8CE-7B19-4850-87B8-F442F09C0BA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {5D5AA8CE-7B19-4850-87B8-F442F09C0BA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {5D5AA8CE-7B19-4850-87B8-F442F09C0BA1}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {FC20D29E-9C68-4F04-9B00-979EAECD5E5F}.Debug|Any CPU.ActiveCfg = Debug
21 | {FC20D29E-9C68-4F04-9B00-979EAECD5E5F}.Release|Any CPU.ActiveCfg = Release
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | GlobalSection(ExtensibilityGlobals) = postSolution
27 | SolutionGuid = {56CE5A41-4BF7-4C6F-A4FF-9BA7F71413E0}
28 | EndGlobalSection
29 | EndGlobal
30 |
--------------------------------------------------------------------------------
/小小截图OCR/AcceptSelectEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Media.Imaging;
8 |
9 | namespace 小小截图OCR {
10 | public class AcceptSelectEventArgs : RoutedEventArgs {
11 | public BitmapSource SelectBitmap { get; }
12 |
13 | public AcceptSelectEventArgs(BitmapSource bitmap, RoutedEvent routedEvent, object source) : base(routedEvent, source) {
14 | SelectBitmap = bitmap;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/小小截图OCR/AcceptSelectHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 |
8 | namespace 小小截图OCR {
9 | public delegate void AcceptSelectHandler(object sender, AcceptSelectEventArgs e);
10 | }
11 |
--------------------------------------------------------------------------------
/小小截图OCR/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/小小截图OCR/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/小小截图OCR/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace 小小截图OCR {
10 | ///
11 | /// App.xaml 的交互逻辑
12 | ///
13 | public partial class App : Application {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/小小截图OCR/Base64.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Drawing;
7 | using System.IO;
8 |
9 | namespace 小小截图OCR
10 | {
11 | class Base64
12 | {
13 | //图片转为base64编码的字符串
14 | public string ImgToBase64String(Bitmap imageBitmap)
15 | {
16 | try
17 | {
18 | //Bitmap bmp = new Bitmap(Imagefilename);
19 | Bitmap bmp = imageBitmap;
20 |
21 | MemoryStream ms = new MemoryStream();
22 | bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
23 | byte[] arr = new byte[ms.Length];
24 | ms.Position = 0;
25 | ms.Read(arr, 0, (int)ms.Length);
26 | ms.Close();
27 | return Convert.ToBase64String(arr);
28 | }
29 | catch (Exception ex)
30 | {
31 | return null;
32 | }
33 | }
34 |
35 | //threeebase64编码的字符串转为图片
36 | public Bitmap Base64StringToImage(string strbase64)
37 | {
38 | try
39 | {
40 | byte[] arr = Convert.FromBase64String(strbase64);
41 | MemoryStream ms = new MemoryStream(arr);
42 | Bitmap bmp = new Bitmap(ms);
43 |
44 | bmp.Save(@"d:\test.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
45 | //bmp.Save(@"d:\"test.bmp", ImageFormat.Bmp);
46 | //bmp.Save(@"d:\"test.gif", ImageFormat.Gif);
47 | //bmp.Save(@"d:\"test.png", ImageFormat.Png);
48 | ms.Close();
49 | return bmp;
50 | }
51 | catch (Exception ex)
52 | {
53 | return null;
54 | }
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/小小截图OCR/Command.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Input;
7 |
8 | namespace 小小截图OCR {
9 | public class Command : ICommand {
10 | public event EventHandler CanExecuteChanged;
11 |
12 | private Action executeAction;
13 | private Func canExecuteAction;
14 |
15 | public Command(Action executeAction, Func canExecuteAction = null) {
16 | this.executeAction = executeAction;
17 | this.canExecuteAction = canExecuteAction;
18 | }
19 |
20 | public bool CanExecute(T parameter) {
21 | return canExecuteAction?.Invoke(parameter) ?? true;
22 | }
23 |
24 | bool ICommand.CanExecute(object parameter) {
25 | if (parameter == null) return true;
26 | return parameter is T param && CanExecute(param);
27 | }
28 |
29 | public void Execute(T parameter) {
30 | executeAction?.Invoke(parameter);
31 | }
32 |
33 | void ICommand.Execute(object parameter) {
34 | Execute((T) parameter);
35 | }
36 |
37 | public void RaiseCanExecuteChanged() {
38 | CanExecuteChanged?.Invoke(this, EventArgs.Empty);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/小小截图OCR/CursorInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace 小小截图OCR {
8 | public struct CursorInfo {
9 | public int Width { get; set; }
10 | public int Height { get; set; }
11 | public int HotX { get; set; }
12 | public int HotY { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/小小截图OCR/HotKey.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows.Input;
8 | using System.Windows;
9 | using System.Windows.Interop;
10 |
11 | namespace 小小截图OCR {
12 | [System.Security.SuppressUnmanagedCodeSecurity]
13 | public class HotKey {
14 | ///
15 | /// 热键消息
16 | ///
17 | const int WM_HOTKEY = 0x312;
18 |
19 | ///
20 | /// 注册热键
21 | ///
22 | [DllImport("user32", SetLastError = true)]
23 | static extern bool RegisterHotKey(IntPtr hWnd, int id, ModifierKeys fsModifuers, Keys vk);
24 |
25 | ///
26 | /// 注销热键
27 | ///
28 | [DllImport("user32", SetLastError = true)]
29 | static extern bool UnregisterHotKey(IntPtr hWnd, int id);
30 |
31 | ///
32 | /// 向原子表中添加全局原子
33 | ///
34 | [DllImport("kernel32", SetLastError = true)]
35 | static extern ushort GlobalAddAtom(string lpString);
36 |
37 | ///
38 | /// 在表中搜索全局原子
39 | ///
40 | [DllImport("kernel32", SetLastError = true)]
41 | static extern ushort GlobalFindAtom(string lpString);
42 |
43 | ///
44 | /// 在表中删除全局原子
45 | ///
46 | [DllImport("kernel32", SetLastError = true)]
47 | static extern ushort GlobalDeleteAtom(string nAtom);
48 |
49 | static string GetString(ModifierKeys modifiers, Keys key)
50 | => $"Saar:{modifiers}+{key}";
51 |
52 |
53 | private HwndSource source;
54 | private Action action;
55 |
56 | public ModifierKeys Modifiers { get; }
57 | public Keys Key { get; }
58 | public int Id { get; }
59 |
60 | private HotKey(Window window, ModifierKeys modifiers, Keys key, Action action) {
61 | Modifiers = modifiers;
62 | Key = key;
63 | this.action = action;
64 |
65 | try {
66 | var helper = new WindowInteropHelper(window);
67 | var hwnd = helper.Handle;
68 | source = HwndSource.FromHwnd(hwnd);
69 | source.AddHook(WndProc);
70 | var strKey = GetString(modifiers, key);
71 | Id = GlobalFindAtom(strKey);
72 | if (Id != 0) {
73 | UnregisterHotKey(hwnd, Id);
74 | } else {
75 | Id = GlobalAddAtom(strKey);
76 | }
77 |
78 | if (!RegisterHotKey(hwnd, Id, modifiers, key))
79 | throw new Exception();
80 | } catch (Exception e) {
81 | throw new HotKeyRegisterFailException(e);
82 | }
83 | }
84 |
85 | public static HotKey Register(Window window, ModifierKeys modifiers, Keys key, Action action) {
86 | return new HotKey(window, modifiers, key, action);
87 | }
88 |
89 | public void Unregister() {
90 | UnregisterHotKey(source.Handle, Id);
91 | GlobalDeleteAtom(GetString(Modifiers, Key));
92 | source.RemoveHook(WndProc);
93 | }
94 |
95 | private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handle) {
96 | if (msg == WM_HOTKEY && (int) wParam == Id) {
97 | action();
98 | handle = true;
99 | }
100 | return IntPtr.Zero;
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/小小截图OCR/HotKeyRegisterFailException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace 小小截图OCR {
8 | public class HotKeyRegisterFailException : Exception {
9 | public HotKeyRegisterFailException(string message, Exception e) : base(message, e) {}
10 |
11 | public HotKeyRegisterFailException(Exception e) : base("注册热键失败。", e) { }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/小小截图OCR/ISelector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 |
8 | namespace 小小截图OCR {
9 | public interface ISelector {
10 | Action