-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsplit_pic.html
More file actions
59 lines (52 loc) · 2.2 KB
/
Copy pathsplit_pic.html
File metadata and controls
59 lines (52 loc) · 2.2 KB
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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>图片切割工具</title>
<script defer src="/assets/js/back-to-home.js"></script>
<link rel="stylesheet" href="assets/css/split_pic.css">
</head>
<body>
<div class="container">
<header>
<h1>🖼️ 图片吸附切割工具</h1>
</header>
<div class="controls">
<div class="control-row">
<label class="file-button">
📂 打开图片
<input type="file" id="fileInput" accept="image/png,image/jpeg,image/jpg" style="display: none;">
</label>
<button id="recut" disabled>✂️ 重新切割</button>
</div>
<div class="control-row">
<label for="threshold">阈值 (纯色突变):</label>
<input type="range" id="threshold" min="0" max="255" value="60" step="1">
<span id="thresholdValue">60</span>
</div>
<div class="control-row">
<span id="selectedCount">已选择 0 条分割线</span>
<button id="applySplit" disabled>✂️ 应用分割并保存</button>
<button id="clearSelection" disabled>🗑️ 清空选择</button>
</div>
</div>
<div id="statusMessage" class="status-message"></div>
<div id="splitsPanel" class="splits-panel" style="display: none;">
<details open>
<summary id="splitsSummary">检测到的分割线 (0 条)</summary>
<div id="splitsWarning" class="warning" style="display: none;"></div>
<div id="splitsList" class="splits-list"></div>
</details>
</div>
<div class="image-container">
<div id="filePath" class="file-path"></div>
<div id="canvasWrapper" class="canvas-wrapper">
<div id="dropHint" class="drop-hint">拖拽图片到此处上传</div>
<canvas id="canvas"></canvas>
</div>
</div>
</div>
<script src="assets/js/split_pic.js" defer></script>
</body>
</html>