Skip to content

Commit

Permalink
4.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
lotress committed Mar 5, 2019
1 parent dd2340e commit 7a6186b
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moephoto",
"version": "4.5.2",
"version": "4.5.4",
"description": "MoePhoto Image Toolbox萌图工具箱 一个基于深度学习的AI图像修复软件(更新中...) 感兴趣的加QQ群320785467讨论 ### 基本功能 * 图像降噪 * 超分辨率 * 去雾 * 涂抹及风格化",
"private": true,
"directories": {
Expand Down
23 changes: 7 additions & 16 deletions python/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,17 @@ def prepare(video, steps):
width = optDecode['width']
if 'height' in optDecode:
height = optDecode['height']
scaleW = scaleH = 1
outWidth, outHeight = (width, height)
for opt in filter((lambda opt: opt['op'] == 'SR' or opt['op'] == 'resize'), procSteps):
if opt['op'] == 'SR':
scaleW *= opt['scale']
scaleH *= opt['scale']
else:
if 'scaleW' in opt:
scaleW = opt['scaleW']
else:
scaleW = 1
outWidth = opt['width']
if 'scaleH' in opt:
scaleH = opt['scaleH']
else:
scaleH = 1
outHeight = opt['height']
outWidth *= opt['scale']
outHeight *= opt['scale']
else: # resize
outWidth = round(outWidth * opt['scaleW']) if 'scaleW' in opt else opt['width']
outHeight = round(outHeight * opt['scaleH']) if 'scaleH' in opt else opt['height']
if start < 0:
start = 0
if start and len(slomos):
if start and len(slomos): # should generate intermediate frames between start-1 and start
start -= 1
for opt in slomos:
opt['opt'].firstTime = 0
Expand Down Expand Up @@ -157,7 +148,7 @@ def prepare(video, steps):
'-y',
'-f', 'rawvideo',
'-pix_fmt', pix_fmt,
'-s', '{}x{}'.format(outWidth * scaleW, outHeight * scaleH),
'-s', '{}x{}'.format(outWidth, outHeight),
'-r', str(frameRate),
'-i', '-',
'-i', video,
Expand Down
6 changes: 6 additions & 0 deletions server.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
setlocal
%~d0
cd %~dp0
ipconfig
MoePhoto.exe -g
3 changes: 2 additions & 1 deletion src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ const panels = {
values: [
{ value: 'scale', binds: ['scaleW'] },
{ value: 'pixel', binds: ['width'], checked: 1 }
]
],
notes: ['按比例缩放图像长宽的小数部分四舍五入为整数']
},
scaleW: {
type: 'number',
Expand Down
9 changes: 6 additions & 3 deletions templates/1-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ <h1>
<li>
<a href="/gallery">相册</a>
</li>
<li>
<a href="/system">系统信息</a>
</li>
<li>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
Expand All @@ -42,13 +45,13 @@ <h1>
</a>
<ul class="dropdown-menu">
<li>
<a href="/document">使用教程</a>
<a href="/lock">后台管理</a>
</li>
<li>
<a href="/about">关于软件</a>
<a href="/document">使用教程</a>
</li>
<li>
<a href="/system">系统信息</a>
<a href="/about">关于软件</a>
</li>
</ul>
</li>
Expand Down
9 changes: 6 additions & 3 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ <h1>
<li>
<a href="/gallery">相册</a>
</li>
<li>
<a href="/system">系统信息</a>
</li>
<li>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
Expand All @@ -62,13 +65,13 @@ <h1>
</a>
<ul class="dropdown-menu">
<li>
<a href="/document">使用教程</a>
<a href="/lock">后台管理</a>
</li>
<li>
<a href="/about">关于软件</a>
<a href="/document">使用教程</a>
</li>
<li>
<a href="/system">系统信息</a>
<a href="/about">关于软件</a>
</li>
</ul>
</li>
Expand Down

0 comments on commit 7a6186b

Please sign in to comment.