Web page
- Add `webgen/gen.rb` to generate web page from template - Add support for mobile browser - Change layouts
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 626 B |
Before Width: | Height: | Size: 520 B |
Before Width: | Height: | Size: 765 B |
|
@ -1,15 +0,0 @@
|
||||||
Flag icons are downloaded from here: https://www.gosquared.com/download/pixels/flags.zip
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Text from LICENSE.txt file (MIT license, GPL-compatible):
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2013 Go Squared Ltd. http://www.gosquared.com/
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
@ -1,77 +1,146 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en-us">
|
<html lang="en">
|
||||||
|
<!-- This file was automatically generated by webgen/gen.rb. Do not make changes to this file manually. -->
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>waifu2x</title>
|
|
||||||
<link rel="shortcut icon" href="favicon.ico"/>
|
<link rel="shortcut icon" href="favicon.ico"/>
|
||||||
<meta id="viewport" name="viewport" content="width=780">
|
<meta name="viewport" content="initial-scale=1.0,width=device-width">
|
||||||
|
<link href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css" rel="stylesheet" type="text/css">
|
||||||
<link href="style.css" rel="stylesheet" type="text/css">
|
<link href="style.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="mobile.css" rel="stylesheet" type="text/css" media="screen and (max-width: 768px) and (min-width: 0px)">
|
||||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
|
||||||
<script type="text/javascript" src="ui.js"></script>
|
<script type="text/javascript" src="ui.js"></script>
|
||||||
|
<title>waifu2x</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="allPage">
|
<div class="all-page">
|
||||||
<div class="mainTitle"><!--
|
<h1 class="main-title">waifu2x</h1>
|
||||||
--><div class="mainTitle-text">waifu2x</div><!--
|
<div class="choose-lang">
|
||||||
--><a href="index.html" class="flagLink first"><img src="img/flags/US.png" class="chooseLang"></a><!--
|
<a href="index.html">
|
||||||
--><a href="index.ja.html" class="flagLink"><img src="img/flags/JP.png" class="chooseLang"></a><!--
|
English
|
||||||
--><a href="index.ru.html" class="flagLink"><img src="img/flags/RU.png" class="chooseLang"></a><!--
|
</a>
|
||||||
--></div>
|
/
|
||||||
|
<a href="index.ja.html">
|
||||||
|
日本語
|
||||||
|
</a>
|
||||||
|
/
|
||||||
|
<a href="index.ru.html">
|
||||||
|
Русский
|
||||||
|
</a>
|
||||||
|
/
|
||||||
|
<a href="index.pt.html">
|
||||||
|
Português
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<p>Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.</p>
|
<p>Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.</p>
|
||||||
<p class="margin1 linksBox"><a href="https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png" class="blueLink" target="_blank">Show full demonstration</a> | <a href="https://github.com/nagadomi/waifu2x" class="blueLink" target="_blank">Go to GitHub</a></p>
|
<p class="margin1 link-box">
|
||||||
<img src="img/example2-zip.png" class="example">
|
<a href="https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png" class="blue-link" target="_blank">
|
||||||
|
Show full demonstration
|
||||||
<div class="secondTitle">Convert image:</div>
|
</a>
|
||||||
|
|
|
||||||
|
<a href="https://github.com/nagadomi/waifu2x" class="blue-link" target="_blank">
|
||||||
|
Go to GitHub
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
<form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
|
<form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
|
||||||
<div class="optionBox first">
|
<div class="option-box first">
|
||||||
<div class="option-left">Image choosing:</div>
|
<div class="option-left">Image choosing:</div>
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<input type="text" id="url" name="url" placeholder="Type URL">
|
<input type="text" id="url" name="url" placeholder="Type URL">
|
||||||
<div class="option-right-small">Or choose a file: <input type="file" id="file" name="file"></div>
|
<div class="option-right-small">
|
||||||
|
Or choose a file:
|
||||||
|
<input type="file" id="file" name="file"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="option-hint">Limits: Size: 2MB, Noise Reduction: 2560x2560px, Upscaling: 1280x1280px.</div>
|
<div class="option-hint">
|
||||||
|
Limits: Size: 2MB, Noise Reduction: 2560x2560px, Upscaling: 1280x1280px.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
Style:
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="optionBox">
|
|
||||||
<div class="option-left">Style:</div>
|
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<label><input type="radio" name="style" class="radio" value="art" checked><span class="r-text">Artwork</span></label>
|
<label><input type="radio" name="style" class="radio" value="art" checked>
|
||||||
<label><input type="radio" name="style" class="radio" value="photo"><span class="r-text">Photo</span></label>
|
<span class="r-text">
|
||||||
|
Artwork
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="style" class="radio" value="photo">
|
||||||
|
<span class="r-text">
|
||||||
|
Photo
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
Noise Reduction:
|
||||||
|
<div class="option-left-small">
|
||||||
|
(expect JPEG artifact)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="optionBox">
|
|
||||||
<div class="option-left">Noise Reduction:<div class="option-left-small">(expect JPEG artifact)</div></div>
|
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<label><input type="radio" name="noise" class="radio" value="0"><span class="r-text">None</span></label>
|
<label><input type="radio" name="noise" class="radio" value="0">
|
||||||
<label><input type="radio" name="noise" class="radio" value="1" checked><span class="r-text">Medium</span></label>
|
<span class="r-text">
|
||||||
<label><input type="radio" name="noise" class="radio" value="2"><span class="r-text">High</span></label>
|
None
|
||||||
<label><input type="radio" name="noise" class="radio" value="3"><span class="r-text">Super (tmp)</span></label>
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="noise" class="radio" value="1" checked>
|
||||||
|
<span class="r-text">
|
||||||
|
Medium
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="radio" name="noise" class="radio" value="2">
|
||||||
|
<span class="r-text">
|
||||||
|
High
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="option-hint">You need use noise reduction if image actually has noise or it may cause opposite effect.</div>
|
<div class="option-hint">
|
||||||
|
You need use noise reduction if image actually has noise or it may cause opposite effect.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
Upscaling:
|
||||||
|
<div class="option-left-small"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="optionBox">
|
|
||||||
<div class="option-left">Upscaling:<div class="option-left-small"></div></div>
|
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<label><input type="radio" name="scale" class="radio" value="0" checked><span class="r-text">None</span></label>
|
<label><input type="radio" name="scale" class="radio" value="0" checked>
|
||||||
<label><input type="radio" name="scale" class="radio" value="1"><span class="r-text">1.6x</span></label>
|
<span class="r-text">
|
||||||
<label><input type="radio" name="scale" class="radio" value="2"><span class="r-text">2x</span></label>
|
None
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="scale" class="radio" value="1">
|
||||||
|
<span class="r-text">
|
||||||
|
1.6x
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="scale" class="radio" value="2">
|
||||||
|
<span class="r-text">
|
||||||
|
2x
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="submit" class="button" value="Convert">
|
<input type="submit" class="button" value="Convert">
|
||||||
<input type="submit" name="download" value="Download" class="button">
|
|
||||||
|
|
||||||
<div class="bottomHint">If you are using Firefox, Please press the CTRL+S key to save image. "Save Image" option doesn't work.</div>
|
<input type="submit" name="download" value="Download" class="button">
|
||||||
<!--<div class="bottomHint">This website uses Google Analytics to help us improve the website content.</div>-->
|
<div class="bottom-hint">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li>If you are using Firefox, Please press the CTRL+S key to save image. "Save Image" option doesn't work.</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottomInfo">
|
<div class="bottom-info">
|
||||||
<a href="https://github.com/nagadomi/waifu2x" class="grayLink" target="_blank">waifu2x</a>
|
<a href="https://github.com/nagadomi/waifu2x" class="gray-link" target="_blank">waifu2x</a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,77 +1,146 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ja">
|
<html lang="ja">
|
||||||
|
<!-- This file was automatically generated by webgen/gen.rb. Do not make changes to this file manually. -->
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>waifu2x</title>
|
|
||||||
<link rel="shortcut icon" href="favicon.ico"/>
|
<link rel="shortcut icon" href="favicon.ico"/>
|
||||||
<meta id="viewport" name="viewport" content="width=780">
|
<meta name="viewport" content="initial-scale=1.0,width=device-width">
|
||||||
|
<link href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css" rel="stylesheet" type="text/css">
|
||||||
<link href="style.css" rel="stylesheet" type="text/css">
|
<link href="style.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="mobile.css" rel="stylesheet" type="text/css" media="screen and (max-width: 768px) and (min-width: 0px)">
|
||||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
|
||||||
<script type="text/javascript" src="ui.js"></script>
|
<script type="text/javascript" src="ui.js"></script>
|
||||||
|
<title>waifu2x</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="allPage">
|
<div class="all-page">
|
||||||
<div class="mainTitle"><!--
|
<h1 class="main-title">waifu2x</h1>
|
||||||
--><div class="mainTitle-text">waifu2x</div><!--
|
<div class="choose-lang">
|
||||||
--><a href="index.html" class="flagLink first"><img src="img/flags/US.png" class="chooseLang"></a><!--
|
<a href="index.html">
|
||||||
--><a href="index.ja.html" class="flagLink"><img src="img/flags/JP.png" class="chooseLang"></a><!--
|
English
|
||||||
--><a href="index.ru.html" class="flagLink"><img src="img/flags/RU.png" class="chooseLang"></a><!--
|
</a>
|
||||||
--></div>
|
/
|
||||||
|
<a href="index.ja.html">
|
||||||
|
日本語
|
||||||
|
</a>
|
||||||
|
/
|
||||||
|
<a href="index.ru.html">
|
||||||
|
Русский
|
||||||
|
</a>
|
||||||
|
/
|
||||||
|
<a href="index.pt.html">
|
||||||
|
Português
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<p>深層畳み込みニューラルネットワークによる二次元画像のための超解像システム。 写真にも対応。</p>
|
<p>深層畳み込みニューラルネットワークによる二次元画像のための超解像システム。 写真にも対応。</p>
|
||||||
<p class="margin1 linksBox"><a href="https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png" class="blueLink" target="_blank">デモンストレーションを見ます</a> | <a href="https://github.com/nagadomi/waifu2x" class="blueLink" target="_blank">GitHubに行きます</a></p>
|
<p class="margin1 link-box">
|
||||||
<img src="img/example2-zip.png" class="example">
|
<a href="https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png" class="blue-link" target="_blank">
|
||||||
|
実行例を表示
|
||||||
<div class="secondTitle">画像を変換します:</div>
|
</a>
|
||||||
|
|
|
||||||
|
<a href="https://github.com/nagadomi/waifu2x" class="blue-link" target="_blank">
|
||||||
|
プロジェクトページ(GitHub)
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
<form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
|
<form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
|
||||||
<div class="optionBox first">
|
<div class="option-box first">
|
||||||
<div class="option-left">画像:</div>
|
<div class="option-left">画像を選択:</div>
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<input type="text" id="url" name="url" placeholder="URLを書いてか">
|
<input type="text" id="url" name="url" placeholder="URLを入力">
|
||||||
<div class="option-right-small">ファイルを選んでください: <input type="file" id="file" name="file"></div>
|
<div class="option-right-small">
|
||||||
|
ファイルを選択:
|
||||||
|
<input type="file" id="file" name="file"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="option-hint">制限: サイズ: 2MB, ノイズ除去: 2560x2560px, 拡大後: 1280x1280px</div>
|
<div class="option-hint">
|
||||||
|
制限: サイズ: 3MB, ノイズ除去: 2560x2560px, 拡大(前): 1280x1280px.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
スタイル:
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="optionBox">
|
|
||||||
<div class="option-left">スタイル:</div>
|
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<label><input type="radio" name="style" class="radio" value="art" checked><span class="r-text">イラスト</span></label>
|
<label><input type="radio" name="style" class="radio" value="art" checked>
|
||||||
<label><input type="radio" name="style" class="radio" value="photo"><span class="r-text">写真</span></label>
|
<span class="r-text">
|
||||||
|
イラスト
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="style" class="radio" value="photo">
|
||||||
|
<span class="r-text">
|
||||||
|
写真
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
ノイズ除去:
|
||||||
|
<div class="option-left-small">
|
||||||
|
(JPEGノイズを想定)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="optionBox">
|
|
||||||
<div class="option-left">ノイズ除去:<div class="option-left-small">(JPEGノイズを想定)</div></div>
|
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<label><input type="radio" name="noise" class="radio" value="0"><span class="r-text">なし</span></label>
|
<label><input type="radio" name="noise" class="radio" value="0">
|
||||||
<label><input type="radio" name="noise" class="radio" value="1" checked><span class="r-text">弱</span></label>
|
<span class="r-text">
|
||||||
<label><input type="radio" name="noise" class="radio" value="2"><span class="r-text">強</span></label>
|
なし
|
||||||
<label><input type="radio" name="noise" class="radio" value="3"><span class="r-text">スーパー</span></label>
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="noise" class="radio" value="1" checked>
|
||||||
|
<span class="r-text">
|
||||||
|
中
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="radio" name="noise" class="radio" value="2">
|
||||||
|
<span class="r-text">
|
||||||
|
高
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="option-hint">画像はノイズがなければノイズ除去すると逆効果を引き起こす可能性があります。</div>
|
<div class="option-hint">
|
||||||
|
ノイズ除去は細部が消えることがあります。JPEGノイズがある場合に使用します。
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
拡大:
|
||||||
|
<div class="option-left-small"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="optionBox">
|
|
||||||
<div class="option-left">拡大:<div class="option-left-small"></div></div>
|
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<label><input type="radio" name="scale" class="radio" value="0" checked><span class="r-text">なし</span></label>
|
<label><input type="radio" name="scale" class="radio" value="0" checked>
|
||||||
<label><input type="radio" name="scale" class="radio" value="1"><span class="r-text">1.6x</span></label>
|
<span class="r-text">
|
||||||
<label><input type="radio" name="scale" class="radio" value="2"><span class="r-text">2x</span></label>
|
なし
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="scale" class="radio" value="1">
|
||||||
|
<span class="r-text">
|
||||||
|
1.6x
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="scale" class="radio" value="2">
|
||||||
|
<span class="r-text">
|
||||||
|
2x
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="submit" class="button" value="実行">
|
<input type="submit" class="button" value="実行">
|
||||||
<input type="submit" name="download" value="結果を保存" class="button">
|
|
||||||
|
|
||||||
<div class="bottomHint">Firefoxの方は、右クリから画像が保存できないようなので、CTRL+SキーかALTキー後 ファイル - ページを保存 で画像を保存してください。</div>
|
<input type="submit" name="download" value="実行結果を保存" class="button">
|
||||||
<!--<div class="bottomHint">本サイトは、コンテンツ改善のために Google Analytics を使用しています。 </div>-->
|
<div class="bottom-hint">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li>Firefoxの方は、右クリから画像が保存できないようなので、CTRL+SキーかALTキー後 ファイル - ページを保存 で画像を保存してください。</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottomInfo">
|
<div class="bottom-info">
|
||||||
<a href="https://github.com/nagadomi/waifu2x" class="grayLink" target="_blank">waifu2x</a>
|
<a href="https://github.com/nagadomi/waifu2x" class="gray-link" target="_blank">waifu2x</a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,66 +1,146 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="pt">
|
||||||
|
<!-- This file was automatically generated by webgen/gen.rb. Do not make changes to this file manually. -->
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<title>waifu2x</title>
|
<meta charset="utf-8">
|
||||||
|
<link rel="shortcut icon" href="favicon.ico"/>
|
||||||
|
<meta name="viewport" content="initial-scale=1.0,width=device-width">
|
||||||
|
<link href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css" rel="stylesheet" type="text/css">
|
||||||
<link href="style.css" rel="stylesheet" type="text/css">
|
<link href="style.css" rel="stylesheet" type="text/css">
|
||||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
<link href="mobile.css" rel="stylesheet" type="text/css" media="screen and (max-width: 768px) and (min-width: 0px)">
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
|
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
|
||||||
<script type="text/javascript" src="ui.js"></script>
|
<script type="text/javascript" src="ui.js"></script>
|
||||||
|
<title>waifu2x</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>waifu2x</h1>
|
<div class="all-page">
|
||||||
<div class="header">
|
<h1 class="main-title">waifu2x</h1>
|
||||||
<div class="github-banner">
|
<div class="choose-lang">
|
||||||
<img class="github-banner-image" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png">
|
<a href="index.html">
|
||||||
<a class="github-banner-link" href="https://github.com/nagadomi/waifu2x" target="_blank"></a>
|
English
|
||||||
</div>
|
</a>
|
||||||
<a href="index.html">en</a>/<a href="index.ja.html">ja</a>/<a href="index.ru.html">ru</a>/<a href="index.pt.html">pt</a>
|
/
|
||||||
</div>
|
<a href="index.ja.html">
|
||||||
<div class="about">
|
日本語
|
||||||
<div>Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo. <a href="https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png" target="_blank">sobre</a>.</div>
|
</a>
|
||||||
<div></div>
|
/
|
||||||
|
<a href="index.ru.html">
|
||||||
|
Русский
|
||||||
|
</a>
|
||||||
|
/
|
||||||
|
<a href="index.pt.html">
|
||||||
|
Português
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<p>Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.</p>
|
||||||
|
<p class="margin1 link-box">
|
||||||
|
<a href="https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png" class="blue-link" target="_blank">
|
||||||
|
Sobre
|
||||||
|
</a>
|
||||||
|
|
|
||||||
|
<a href="https://github.com/nagadomi/waifu2x" class="blue-link" target="_blank">
|
||||||
|
Ir para Github
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
<form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
|
<form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
|
||||||
<fieldset>
|
<div class="option-box first">
|
||||||
<legend>Imagem</legend>
|
<div class="option-left">Imagem:</div>
|
||||||
<div>
|
<div class="option-right">
|
||||||
URL: <input id="url" type="text" name="url" style="width:400px"> ou
|
<input type="text" id="url" name="url" placeholder="URL">
|
||||||
|
<div class="option-right-small">
|
||||||
|
ARQUIVO:
|
||||||
|
<input type="file" id="file" name="file"></div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="option-hint">
|
||||||
ARQUIVO: <input id="file" type="file" name="file">
|
Limites: Tamanho: 2MB, Redução de ruído: 2560x2560px, Aumento de escala: 1280x1280px.
|
||||||
</div>
|
</div>
|
||||||
<div class="help">
|
|
||||||
Limites: Tamanho: 2MB, Redução de ruído: 2560x2560px, Aumento de escala: 1280x1280px
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
<div class="option-box">
|
||||||
<fieldset>
|
<div class="option-left">
|
||||||
<legend>Estilo</legend>
|
Estilo:
|
||||||
<label><input type="radio" name="style" value="art" checked>Arte</label>
|
</div>
|
||||||
<label><input type="radio" name="style" value="photo">Foto</label>
|
<div class="option-right">
|
||||||
</fieldset>
|
<label><input type="radio" name="style" class="radio" value="art" checked>
|
||||||
<fieldset class="noise-field">
|
<span class="r-text">
|
||||||
<legend>Redução de ruído (Exceto artefato JPEG)</legend>
|
Arte
|
||||||
<label><input type="radio" name="noise" value="0"> Nenhuma</label>
|
</span>
|
||||||
<label><input type="radio" name="noise" value="1" checked="checked"> Média</label>
|
</label>
|
||||||
<label><input type="radio" name="noise" value="2"> Alta</label>
|
<label><input type="radio" name="style" class="radio" value="photo">
|
||||||
<div class="help">
|
<span class="r-text">
|
||||||
|
Foto
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
Redução de ruído:
|
||||||
|
<div class="option-left-small">
|
||||||
|
(Exceto artefato JPEG)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-right">
|
||||||
|
<label><input type="radio" name="noise" class="radio" value="0">
|
||||||
|
<span class="r-text">
|
||||||
|
Nenhuma
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="noise" class="radio" value="1" checked>
|
||||||
|
<span class="r-text">
|
||||||
|
Média
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="radio" name="noise" class="radio" value="2">
|
||||||
|
<span class="r-text">
|
||||||
|
Alta
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="option-hint">
|
||||||
Quando usando a escala 2x, Nós nunca recomendamos usar um nível alto de redução de ruído, quase sempre deixa a imagem pior, faz sentido apenas para casos raros quando a imagem tinha uma qualidade muito má desde o começo.
|
Quando usando a escala 2x, Nós nunca recomendamos usar um nível alto de redução de ruído, quase sempre deixa a imagem pior, faz sentido apenas para casos raros quando a imagem tinha uma qualidade muito má desde o começo.
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</div>
|
||||||
<fieldset>
|
<div class="option-box">
|
||||||
<legend>Aumento de escala</legend>
|
<div class="option-left">
|
||||||
<label><input type="radio" name="scale" value="0" checked="checked"> Nenhum</label>
|
Aumento de escala:
|
||||||
<label><input type="radio" name="scale" value="1"> 1.6x</label>
|
<div class="option-left-small"></div>
|
||||||
<label><input type="radio" name="scale" value="2"> 2x</label>
|
</div>
|
||||||
</fieldset>
|
<div class="option-right">
|
||||||
<input type="submit" class="button"/><br>
|
<label><input type="radio" name="scale" class="radio" value="0" checked>
|
||||||
<input type="submit" name="download" value="Download" class="button"/>
|
<span class="r-text">
|
||||||
</form>
|
Nenhum
|
||||||
<div class="help">
|
</span>
|
||||||
<ul class="padding-left">
|
</label>
|
||||||
<li>Se Você estiver usando o Firefox, por favor, aperte CTRL+S para salvar a imagem. A opção "Salvar Imagem" não funciona
|
<label><input type="radio" name="scale" class="radio" value="1">
|
||||||
|
<span class="r-text">
|
||||||
|
1.6x
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="scale" class="radio" value="2">
|
||||||
|
<span class="r-text">
|
||||||
|
2x
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit" class="button" value="Converter">
|
||||||
|
|
||||||
|
<input type="submit" name="download" value="Baixar" class="button">
|
||||||
|
<div class="bottom-hint">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li>Se Você estiver usando o Firefox, por favor, aperte CTRL+S para salvar a imagem. A opção "Salvar Imagem" não funciona</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-info">
|
||||||
|
<a href="https://github.com/nagadomi/waifu2x" class="gray-link" target="_blank">waifu2x</a>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,78 +1,146 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ru">
|
<html lang="ru">
|
||||||
|
<!-- This file was automatically generated by webgen/gen.rb. Do not make changes to this file manually. -->
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>waifu2x</title>
|
|
||||||
<link rel="shortcut icon" href="favicon.ico"/>
|
<link rel="shortcut icon" href="favicon.ico"/>
|
||||||
<meta id="viewport" name="viewport" content="width=780">
|
<meta name="viewport" content="initial-scale=1.0,width=device-width">
|
||||||
|
<link href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css" rel="stylesheet" type="text/css">
|
||||||
<link href="style.css" rel="stylesheet" type="text/css">
|
<link href="style.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="mobile.css" rel="stylesheet" type="text/css" media="screen and (max-width: 768px) and (min-width: 0px)">
|
||||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
|
||||||
<script type="text/javascript" src="ui.js"></script>
|
<script type="text/javascript" src="ui.js"></script>
|
||||||
|
<title>waifu2x</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="allPage">
|
<div class="all-page">
|
||||||
<div class="mainTitle"><!--
|
<h1 class="main-title">waifu2x</h1>
|
||||||
--><div class="mainTitle-text">waifu2x</div><!--
|
<div class="choose-lang">
|
||||||
--><a href="index.html" class="flagLink first"><img src="img/flags/US.png" class="chooseLang"></a><!--
|
<a href="index.html">
|
||||||
--><a href="index.ja.html" class="flagLink"><img src="img/flags/JP.png" class="chooseLang"></a><!--
|
English
|
||||||
--><a href="index.ru.html" class="flagLink"><img src="img/flags/RU.png" class="chooseLang"></a><!--
|
</a>
|
||||||
--></div>
|
/
|
||||||
<p>Waifu2x позволяет увеличивать в 4 раза рисованные изображения, например аниме или арт, а также устранять шум на изображении (преимущественно артефакты сжатия JPEG).</p>
|
<a href="index.ja.html">
|
||||||
<p>Теперь также поддерживаются фотографии.</p>
|
日本語
|
||||||
<p class="margin1 linksBox"><a href="https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png" class="blueLink" target="_blank">Посмотреть полную демонстрацию</a> | <a href="https://github.com/nagadomi/waifu2x" class="blueLink" target="_blank">Перейти на GitHub</a></p>
|
</a>
|
||||||
<img src="img/example2-zip.png" class="example">
|
/
|
||||||
|
<a href="index.ru.html">
|
||||||
<div class="secondTitle">Преобразовать изображение:</div>
|
Русский
|
||||||
|
</a>
|
||||||
|
/
|
||||||
|
<a href="index.pt.html">
|
||||||
|
Português
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<p>Waifu2x позволяет увеличивать в 4 раза рисованные изображения, например аниме или арт, а также устранять шум на изображении (преимущественно артефакты сжатия JPEG). Теперь также поддерживаются фотографии.</p>
|
||||||
|
<p class="margin1 link-box">
|
||||||
|
<a href="https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png" class="blue-link" target="_blank">
|
||||||
|
Посмотреть полную демонстрацию
|
||||||
|
</a>
|
||||||
|
|
|
||||||
|
<a href="https://github.com/nagadomi/waifu2x" class="blue-link" target="_blank">
|
||||||
|
Перейти на GitHub
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
<form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
|
<form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
|
||||||
<div class="optionBox first">
|
<div class="option-box first">
|
||||||
<div class="option-left">Выбор изображения:</div>
|
<div class="option-left">Выбор изображения:</div>
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<input type="text" id="url" name="url" placeholder="Укажите URL">
|
<input type="text" id="url" name="url" placeholder="Укажите URL">
|
||||||
<div class="option-right-small">Либо выберите файл: <input type="file" id="file" name="file"></div>
|
<div class="option-right-small">
|
||||||
|
Либо выберите файл:
|
||||||
|
<input type="file" id="file" name="file"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="option-hint">Макс. размер файла — 2MB, устранение шума — макс. 2560x2560px, апскейл — 1280x1280px.</div>
|
<div class="option-hint">
|
||||||
|
Макс. размер файла — 2MB, устранение шума — макс. 2560x2560px, апскейл — 1280x1280px.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
Тип изображения:
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="optionBox">
|
|
||||||
<div class="option-left">Тип изображения:</div>
|
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<label><input type="radio" name="style" class="radio" value="art" checked><span class="r-text">Арт</span></label>
|
<label><input type="radio" name="style" class="radio" value="art" checked>
|
||||||
<label><input type="radio" name="style" class="radio" value="photo"><span class="r-text">Фотография</span></label>
|
<span class="r-text">
|
||||||
|
Арт
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="style" class="radio" value="photo">
|
||||||
|
<span class="r-text">
|
||||||
|
Фотография
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
Устранение шума:
|
||||||
|
<div class="option-left-small">
|
||||||
|
(артефактов JPEG)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="optionBox">
|
|
||||||
<div class="option-left">Устранение шума:<div class="option-left-small">(артефактов JPEG)</div></div>
|
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<label><input type="radio" name="noise" class="radio" value="0"><span class="r-text">Нет</span></label>
|
<label><input type="radio" name="noise" class="radio" value="0">
|
||||||
<label><input type="radio" name="noise" class="radio" value="1" checked><span class="r-text">Средне</span></label>
|
<span class="r-text">
|
||||||
<label><input type="radio" name="noise" class="radio" value="2"><span class="r-text">Сильно</span></label>
|
Нет
|
||||||
<label><input type="radio" name="noise" class="radio" value="3"><span class="r-text">Очень сильно (эксперим.)</span></label>
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="noise" class="radio" value="1" checked>
|
||||||
|
<span class="r-text">
|
||||||
|
Средне
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="radio" name="noise" class="radio" value="2">
|
||||||
|
<span class="r-text">
|
||||||
|
Сильно
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="option-hint">Устранение шума нужно использовать, если на картинке действительно есть шум, иначе это даст противоположный эффект.</div>
|
<div class="option-hint">
|
||||||
|
Устранение шума нужно использовать, если на картинке действительно есть шум, иначе это даст противоположный эффект.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
Апскейл:
|
||||||
|
<div class="option-left-small"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="optionBox">
|
|
||||||
<div class="option-left">Апскейл:<div class="option-left-small">(увеличение размера)</div></div>
|
|
||||||
<div class="option-right">
|
<div class="option-right">
|
||||||
<label><input type="radio" name="scale" class="radio" value="0" checked><span class="r-text">Нет</span></label>
|
<label><input type="radio" name="scale" class="radio" value="0" checked>
|
||||||
<label><input type="radio" name="scale" class="radio" value="1"><span class="r-text">1.6x</span></label>
|
<span class="r-text">
|
||||||
<label><input type="radio" name="scale" class="radio" value="2"><span class="r-text">2x</span></label>
|
Нет
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="scale" class="radio" value="1">
|
||||||
|
<span class="r-text">
|
||||||
|
1.6x
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="scale" class="radio" value="2">
|
||||||
|
<span class="r-text">
|
||||||
|
2x
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="submit" class="button" value="Преобразовать">
|
<input type="submit" class="button" value="Преобразовать">
|
||||||
<input type="submit" name="download" value="Скачать" class="button">
|
|
||||||
|
|
||||||
<div class="bottomHint">Если Вы используете Firefox, для сохранения изображения нажмите Ctrl+S (перетаскивание изображения и опция "Сохранить изображение" работать не будут).</div>
|
<input type="submit" name="download" value="Скачать" class="button">
|
||||||
<!--<div class="bottomHint">Этот сайт использует Google Analytics, чтобы помочь нам повысить качество содержания сайта.</div>-->
|
<div class="bottom-hint">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li>Если Вы используете Firefox, для сохранения изображения нажмите Ctrl+S (перетаскивание изображения и опция "Сохранить изображение" работать не будут).</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottomInfo">
|
<div class="bottom-info">
|
||||||
<a href="https://github.com/nagadomi/waifu2x" class="grayLink" target="_blank">waifu2x</a>
|
<a href="https://github.com/nagadomi/waifu2x" class="gray-link" target="_blank">waifu2x</a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
28
assets/mobile.css
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
body {
|
||||||
|
width: 98%;
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
.all-page {
|
||||||
|
width: auto;
|
||||||
|
margin: 1em auto;
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
.main-title {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.option-left {
|
||||||
|
width: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
#url {
|
||||||
|
width: 100%;
|
||||||
|
height: 2em;
|
||||||
|
}
|
||||||
|
.option-right {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
min-width: 10px;
|
||||||
|
width: 100%;
|
||||||
|
height: 3em;
|
||||||
|
}
|
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 221 KiB |
Before Width: | Height: | Size: 102 KiB |
|
@ -1,51 +1,75 @@
|
||||||
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; vertical-align: top; background: transparent; } /*Reset style*/
|
button::-moz-focus-inner,
|
||||||
button::-moz-focus-inner, input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="file"] > input[type="button"]::-moz-focus-inner { border: none; } input[type="checkbox"]:focus { -moz-outline-offset: -1px !important; -moz-outline: 1px solid #000 !important; } :focus { outline: none; } /*Remove a dotted line around 1) buttons, 2) checkboxes, 3) links*/
|
input[type="reset"]::-moz-focus-inner,
|
||||||
a { text-decoration: none; cursor: pointer; color: inherit; } a:hover { text-decoration: underline; }
|
input[type="button"]::-moz-focus-inner,
|
||||||
div, span, a, input { background-repeat: no-repeat; }
|
input[type="submit"]::-moz-focus-inner,
|
||||||
|
input[type="submit"]::-moz-focus-inner,
|
||||||
|
input[type="file"] > input[type="button"]::-moz-focus-inner
|
||||||
|
{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
input[type="checkbox"]:focus {
|
||||||
|
-moz-outline-offset: -1px !important;
|
||||||
|
-moz-outline: 1px solid #000 !important;
|
||||||
|
}
|
||||||
|
:focus {
|
||||||
|
outline: none;
|
||||||
|
} /*Remove a dotted line around 1) buttons, 2) checkboxes, 3) links*/
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
div, span, a, input {
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
width: 782px;
|
width: 782px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background: #fff;
|
background: #ccc;
|
||||||
color: #000;
|
color: #000;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: Tahoma, Arial, Verdana, Meiryo, "MS Gothic", sans-serif, Lucida Sans;
|
font-family: Tahoma, Arial, Verdana, Meiryo, "MS Gothic", sans-serif, Lucida Sans;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.all-page {
|
||||||
.allPage {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 690px;
|
width: 690px;
|
||||||
margin: 15px auto;
|
margin: 15px auto;
|
||||||
padding: 10px 30px 15px 30px;
|
padding: 10px 30px 15px 30px;
|
||||||
background: #eee;
|
background: #eee;
|
||||||
border: 2px solid #999;
|
border: 2px solid #999;
|
||||||
|
border-radius: 8px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.allPage:after { content: ""; position: absolute; left: -1px; top: -1px; width: 100%; height: 100%; height: calc(100% - 2px); padding: 0 1px; box-shadow: 0px 5px 8px #bbb; z-index: -1; } /*for crop shadow bottom for 4px (2px from border and 2px from calc)*/
|
.all-page:after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: -1px;
|
||||||
|
top: -1px;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
height: calc(100% - 2px);
|
||||||
|
padding: 0 1px;
|
||||||
|
box-shadow: 0px 5px 8px #bbb;
|
||||||
|
z-index: -1;
|
||||||
|
} /*for crop shadow bottom for 4px (2px from border and 2px from calc)*/
|
||||||
|
|
||||||
.mainTitle {
|
.main-title {
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin: 0.6em 0;
|
margin: 0.6em 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
|
||||||
|
|
||||||
.mainTitle-text {
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flagLink {
|
.choose-lang {
|
||||||
display: inline-block;
|
font-size: 0.8em;
|
||||||
}
|
|
||||||
.flagLink.first { margin-left: 20px; }
|
|
||||||
|
|
||||||
.chooseLang {
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
@ -56,7 +80,7 @@ p {
|
||||||
}
|
}
|
||||||
p.margin1 { margin: 0.9em 0; }
|
p.margin1 { margin: 0.9em 0; }
|
||||||
|
|
||||||
.linksBox {
|
.links-box {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,24 +89,22 @@ p.margin1 { margin: 0.9em 0; }
|
||||||
height: 200px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blueLink {
|
.blue-link {
|
||||||
color: #36b;
|
color: #36b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grayLink {
|
.gray-link {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.second-title {
|
||||||
|
|
||||||
.secondTitle {
|
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin: 2.4em 0 1.2em;
|
margin: 1em 0 1em;
|
||||||
line-height: 1.3em;
|
line-height: 1.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.optionBox {
|
.option-box {
|
||||||
margin: 1.5em 0;
|
margin: 1.5em 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
@ -102,6 +124,7 @@ p.margin1 { margin: 0.9em 0; }
|
||||||
.option-right {
|
.option-right {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.option-right-small {
|
.option-right-small {
|
||||||
|
@ -148,16 +171,18 @@ label {
|
||||||
height: 26px;
|
height: 26px;
|
||||||
margin: 0 10px 3px 0;
|
margin: 0 10px 3px 0;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
|
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
background-image: linear-gradient(to bottom, #f9f9f9, #dadada);
|
background-image: linear-gradient(to bottom, #f9f9f9, #dadada);
|
||||||
border: 1px solid #999;
|
border: 1px solid #999;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.button:hover { background: #f7f7f7; background-image: linear-gradient(to bottom, #fefefe, #e2e2e2); }
|
.button:hover {
|
||||||
|
background: #f7f7f7;
|
||||||
|
background-image: linear-gradient(to bottom, #fefefe, #e2e2e2);
|
||||||
|
}
|
||||||
|
|
||||||
.bottomHint {
|
.bottom-hint {
|
||||||
margin: 0.85em 0;
|
margin: 0.85em 0;
|
||||||
color: #888;
|
color: #888;
|
||||||
font-size: 0.85em;
|
font-size: 0.85em;
|
||||||
|
|
|
@ -11,9 +11,9 @@ $(function (){
|
||||||
function on_change_style(e) {
|
function on_change_style(e) {
|
||||||
var checked = $("input[name=style]:checked");
|
var checked = $("input[name=style]:checked");
|
||||||
if (checked.val() == "art") {
|
if (checked.val() == "art") {
|
||||||
$(".mainTitle-text").text("waifu2x");
|
$(".main-title").text("waifu2x");
|
||||||
} else {
|
} else {
|
||||||
$(".mainTitle-text").html("w<s>/a/</s>ifu2x");
|
$(".main-title").html("w<s>/a/</s>ifu2x");
|
||||||
}
|
}
|
||||||
$.cookie("style", checked.val(), {expires: expires});
|
$.cookie("style", checked.val(), {expires: expires});
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ $(function (){
|
||||||
$("input[name=scale]").filter("[value=" + $.cookie("scale") + "]").prop("checked", true)
|
$("input[name=scale]").filter("[value=" + $.cookie("scale") + "]").prop("checked", true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#url").change(clear_file);
|
$("#url").change(clear_file);
|
||||||
$("#file").change(clear_url);
|
$("#file").change(clear_url);
|
||||||
$("input[name=style]").change(on_change_style);
|
$("input[name=style]").change(on_change_style);
|
||||||
|
|
7
web.lua
|
@ -284,13 +284,8 @@ turbo.log.categories = {
|
||||||
local app = turbo.web.Application:new(
|
local app = turbo.web.Application:new(
|
||||||
{
|
{
|
||||||
{"^/$", FormHandler},
|
{"^/$", FormHandler},
|
||||||
{"^/style.css", turbo.web.StaticFileHandler, path.join(ROOT, "assets", "style.css")},
|
|
||||||
{"^/ui.js", turbo.web.StaticFileHandler, path.join(ROOT, "assets", "ui.js")},
|
|
||||||
{"^/index.html", turbo.web.StaticFileHandler, path.join(ROOT, "assets", "index.html")},
|
|
||||||
{"^/index.ja.html", turbo.web.StaticFileHandler, path.join(ROOT, "assets", "index.ja.html")},
|
|
||||||
{"^/index.ru.html", turbo.web.StaticFileHandler, path.join(ROOT, "assets", "index.ru.html")},
|
|
||||||
{"^/index.pt.html", turbo.web.StaticFileHandler, path.join(ROOT, "assets", "index.pt.html")},
|
|
||||||
{"^/api$", APIHandler},
|
{"^/api$", APIHandler},
|
||||||
|
{"^/([%a%.]+)$", turbo.web.StaticFileHandler, path.join(ROOT, "assets/")},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
app:listen(opt.port, "0.0.0.0", {max_body_size = CURL_MAX_SIZE})
|
app:listen(opt.port, "0.0.0.0", {max_body_size = CURL_MAX_SIZE})
|
||||||
|
|
BIN
webgen/assets/favicon.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
28
webgen/assets/mobile.css
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
body {
|
||||||
|
width: 98%;
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
.all-page {
|
||||||
|
width: auto;
|
||||||
|
margin: 1em auto;
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
.main-title {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.option-left {
|
||||||
|
width: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
#url {
|
||||||
|
width: 100%;
|
||||||
|
height: 2em;
|
||||||
|
}
|
||||||
|
.option-right {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
min-width: 10px;
|
||||||
|
width: 100%;
|
||||||
|
height: 3em;
|
||||||
|
}
|
190
webgen/assets/style.css
Normal file
|
@ -0,0 +1,190 @@
|
||||||
|
button::-moz-focus-inner,
|
||||||
|
input[type="reset"]::-moz-focus-inner,
|
||||||
|
input[type="button"]::-moz-focus-inner,
|
||||||
|
input[type="submit"]::-moz-focus-inner,
|
||||||
|
input[type="submit"]::-moz-focus-inner,
|
||||||
|
input[type="file"] > input[type="button"]::-moz-focus-inner
|
||||||
|
{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
input[type="checkbox"]:focus {
|
||||||
|
-moz-outline-offset: -1px !important;
|
||||||
|
-moz-outline: 1px solid #000 !important;
|
||||||
|
}
|
||||||
|
:focus {
|
||||||
|
outline: none;
|
||||||
|
} /*Remove a dotted line around 1) buttons, 2) checkboxes, 3) links*/
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
div, span, a, input {
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
width: 782px;
|
||||||
|
margin: 0 auto;
|
||||||
|
background: #ccc;
|
||||||
|
color: #000;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: Tahoma, Arial, Verdana, Meiryo, "MS Gothic", sans-serif, Lucida Sans;
|
||||||
|
line-height: 1.5em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.all-page {
|
||||||
|
position: relative;
|
||||||
|
width: 690px;
|
||||||
|
margin: 15px auto;
|
||||||
|
padding: 10px 30px 15px 30px;
|
||||||
|
background: #eee;
|
||||||
|
border: 2px solid #999;
|
||||||
|
border-radius: 8px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.all-page:after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: -1px;
|
||||||
|
top: -1px;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
height: calc(100% - 2px);
|
||||||
|
padding: 0 1px;
|
||||||
|
box-shadow: 0px 5px 8px #bbb;
|
||||||
|
z-index: -1;
|
||||||
|
} /*for crop shadow bottom for 4px (2px from border and 2px from calc)*/
|
||||||
|
|
||||||
|
.main-title {
|
||||||
|
font-size: 2em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 0.6em 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.choose-lang {
|
||||||
|
font-size: 0.8em;
|
||||||
|
margin: 0 5px;
|
||||||
|
opacity: 0.9;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0.4em 0;
|
||||||
|
}
|
||||||
|
p.margin1 { margin: 0.9em 0; }
|
||||||
|
|
||||||
|
.links-box {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.example {
|
||||||
|
width: 445px;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blue-link {
|
||||||
|
color: #36b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gray-link {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.second-title {
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 1em 0 1em;
|
||||||
|
line-height: 1.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-box {
|
||||||
|
margin: 1.5em 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-left {
|
||||||
|
display: inline-block;
|
||||||
|
width: 180px;
|
||||||
|
color: #707070;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-left-small {
|
||||||
|
font-size: 0.8em;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-right {
|
||||||
|
display: inline-block;
|
||||||
|
white-space: normal;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-right-small {
|
||||||
|
margin-top: 2px;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-hint {
|
||||||
|
margin: 0.5em 0;
|
||||||
|
color: #888;
|
||||||
|
font-size: 0.85em;
|
||||||
|
line-height: 1.5em;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
#url {
|
||||||
|
width: 300px;
|
||||||
|
height: 23px;
|
||||||
|
padding: 0 3px;
|
||||||
|
border: 1px solid #b0b0b0;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
margin: 0 5px 0 0;
|
||||||
|
padding: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio {
|
||||||
|
margin: 0 4px 0 0;
|
||||||
|
padding: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.r-text {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio:checked + .r-text { color: #494; }
|
||||||
|
|
||||||
|
.button {
|
||||||
|
min-width: 160px;
|
||||||
|
height: 26px;
|
||||||
|
margin: 0 10px 3px 0;
|
||||||
|
padding-bottom: 1px;
|
||||||
|
background: #f2f2f2;
|
||||||
|
background-image: linear-gradient(to bottom, #f9f9f9, #dadada);
|
||||||
|
border: 1px solid #999;
|
||||||
|
border-radius: 1px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.button:hover {
|
||||||
|
background: #f7f7f7;
|
||||||
|
background-image: linear-gradient(to bottom, #fefefe, #e2e2e2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-hint {
|
||||||
|
margin: 0.85em 0;
|
||||||
|
color: #888;
|
||||||
|
font-size: 0.85em;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
52
webgen/assets/ui.js
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
$(function (){
|
||||||
|
var expires = 365;
|
||||||
|
function clear_file() {
|
||||||
|
var new_file = $("#file").clone();
|
||||||
|
new_file.change(clear_url);
|
||||||
|
$("#file").replaceWith(new_file);
|
||||||
|
}
|
||||||
|
function clear_url() {
|
||||||
|
$("#url").val("")
|
||||||
|
}
|
||||||
|
function on_change_style(e) {
|
||||||
|
var checked = $("input[name=style]:checked");
|
||||||
|
if (checked.val() == "art") {
|
||||||
|
$(".main-title").text("waifu2x");
|
||||||
|
} else {
|
||||||
|
$(".main-title").html("w<s>/a/</s>ifu2x");
|
||||||
|
}
|
||||||
|
$.cookie("style", checked.val(), {expires: expires});
|
||||||
|
}
|
||||||
|
function on_change_noise_level(e)
|
||||||
|
{
|
||||||
|
var checked = $("input[name=noise]:checked");
|
||||||
|
$.cookie("noise", checked.val(), {expires: expires});
|
||||||
|
}
|
||||||
|
function on_change_scale_factor(e)
|
||||||
|
{
|
||||||
|
var checked = $("input[name=scale]:checked");
|
||||||
|
$.cookie("scale", checked.val(), {expires: expires});
|
||||||
|
}
|
||||||
|
function restore_from_cookie()
|
||||||
|
{
|
||||||
|
if ($.cookie("style")) {
|
||||||
|
$("input[name=style]").filter("[value=" + $.cookie("style") + "]").prop("checked", true)
|
||||||
|
}
|
||||||
|
if ($.cookie("noise")) {
|
||||||
|
$("input[name=noise]").filter("[value=" + $.cookie("noise") + "]").prop("checked", true)
|
||||||
|
}
|
||||||
|
if ($.cookie("scale")) {
|
||||||
|
$("input[name=scale]").filter("[value=" + $.cookie("scale") + "]").prop("checked", true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$("#url").change(clear_file);
|
||||||
|
$("#file").change(clear_url);
|
||||||
|
$("input[name=style]").change(on_change_style);
|
||||||
|
$("input[name=noise]").change(on_change_noise_level);
|
||||||
|
$("input[name=scale]").change(on_change_scale_factor);
|
||||||
|
|
||||||
|
restore_from_cookie();
|
||||||
|
on_change_style();
|
||||||
|
on_change_scale_factor();
|
||||||
|
on_change_noise_level();
|
||||||
|
})
|
56
webgen/gen.rb
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
require 'erb'
|
||||||
|
require 'yaml'
|
||||||
|
require 'optparse'
|
||||||
|
require 'fileutils'
|
||||||
|
|
||||||
|
def symbolize_keys(val)
|
||||||
|
if val.is_a?(Hash)
|
||||||
|
val.map{|k,v|
|
||||||
|
[k.to_sym, symbolize_keys(v)]
|
||||||
|
}.to_h
|
||||||
|
elsif val.is_a?(Array)
|
||||||
|
val = val.map{|v| symbolize_keys(v)}
|
||||||
|
else
|
||||||
|
val
|
||||||
|
end
|
||||||
|
end
|
||||||
|
def load_locales(dir)
|
||||||
|
locales = {}
|
||||||
|
Dir.entries(dir).each do |ent|
|
||||||
|
if ent =~ /^\w\w.yml$/
|
||||||
|
lang = File.basename(ent, ".yml")
|
||||||
|
yml = YAML.load_file(File.join(dir, ent))
|
||||||
|
if yml
|
||||||
|
locales[lang.to_sym] = symbolize_keys(yml)
|
||||||
|
else
|
||||||
|
locales[lang.to_sym] = {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
locales
|
||||||
|
end
|
||||||
|
def copy(indir, outdir)
|
||||||
|
files = Dir.entries(indir).to_a.map{|ent|
|
||||||
|
File.join(indir, ent)
|
||||||
|
}.select{|ent|
|
||||||
|
File.file?(ent)
|
||||||
|
}
|
||||||
|
FileUtils.copy(files, outdir, preserve: true)
|
||||||
|
end
|
||||||
|
|
||||||
|
DIR = File.dirname(__FILE__)
|
||||||
|
DEFAULT_LANG = :en
|
||||||
|
LANG_DIR = File.join(DIR, "locales")
|
||||||
|
OUTPUT_DIR = File.join(DIR, "..", "assets")
|
||||||
|
DONT_MAKE_CHANGE = "This file was automatically generated by webgen/gen.rb. Do not make changes to this file manually."
|
||||||
|
locales = load_locales(LANG_DIR)
|
||||||
|
template = File.read(File.join(DIR, "templates", "index.html.erb"))
|
||||||
|
erb = ERB.new(template)
|
||||||
|
locales.each do |lang, locale|
|
||||||
|
output_path = File.join(OUTPUT_DIR, lang == DEFAULT_LANG ? "index.html" : "index.#{lang}.html")
|
||||||
|
t = locales[DEFAULT_LANG].merge(locale)
|
||||||
|
t[:dont_make_change] = DONT_MAKE_CHANGE
|
||||||
|
t[:lang] = lang.to_s
|
||||||
|
File.write(output_path, erb.result(binding))
|
||||||
|
end
|
||||||
|
copy(File.join(DIR, "assets"), OUTPUT_DIR)
|
25
webgen/locales/en.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
title: Waifu2x
|
||||||
|
description: Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.
|
||||||
|
show_demonstration: Show full demonstration
|
||||||
|
go_to_github: Go to GitHub
|
||||||
|
image_choosing: Image choosing
|
||||||
|
type_url: Type URL
|
||||||
|
choose_file: Or choose a file
|
||||||
|
file_limits: "Limits: Size: 2MB, Noise Reduction: 2560x2560px, Upscaling: 1280x1280px."
|
||||||
|
style: Style
|
||||||
|
artwork: Artwork
|
||||||
|
photo: Photo
|
||||||
|
noise_reduction: Noise Reduction
|
||||||
|
expect_jpeg: expect JPEG artifact
|
||||||
|
nr_none: None
|
||||||
|
nr_medium: Medium
|
||||||
|
nr_high: High
|
||||||
|
nr_hint: "You need use noise reduction if image actually has noise or it may cause opposite effect."
|
||||||
|
upscaling: Upscaling
|
||||||
|
up_none: None
|
||||||
|
button_convert: Convert
|
||||||
|
button_download: Download
|
||||||
|
hints:
|
||||||
|
- "If you are using Firefox, Please press the CTRL+S key to save image. \"Save Image\" option doesn't work."
|
||||||
|
|
24
webgen/locales/ja.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
title: Waifu2x
|
||||||
|
description: 深層畳み込みニューラルネットワークによる二次元画像のための超解像システム。 写真にも対応。
|
||||||
|
show_demonstration: 実行例を表示
|
||||||
|
go_to_github: プロジェクトページ(GitHub)
|
||||||
|
image_choosing: 画像を選択
|
||||||
|
type_url: URLを入力
|
||||||
|
choose_file: ファイルを選択
|
||||||
|
file_limits: "制限: サイズ: 2MB, ノイズ除去: 2560x2560px, 拡大(前): 1280x1280px."
|
||||||
|
style: スタイル
|
||||||
|
artwork: イラスト
|
||||||
|
photo: 写真
|
||||||
|
noise_reduction: ノイズ除去
|
||||||
|
expect_jpeg: JPEGノイズを想定
|
||||||
|
nr_none: なし
|
||||||
|
nr_medium: 中
|
||||||
|
nr_high: 高
|
||||||
|
nr_hint: "ノイズ除去は細部が消えることがあります。JPEGノイズがある場合に使用します。"
|
||||||
|
upscaling: 拡大
|
||||||
|
up_none: なし
|
||||||
|
button_convert: 実行
|
||||||
|
button_download: 実行結果を保存
|
||||||
|
hints:
|
||||||
|
- "Firefoxの方は、右クリから画像が保存できないようなので、CTRL+SキーかALTキー後 ファイル - ページを保存 で画像を保存してください。"
|
24
webgen/locales/pt.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
title: Waifu2x
|
||||||
|
description: Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.
|
||||||
|
show_demonstration: Sobre
|
||||||
|
go_to_github: Ir para Github
|
||||||
|
image_choosing: Imagem
|
||||||
|
type_url: URL
|
||||||
|
choose_file: ARQUIVO
|
||||||
|
file_limits: "Limites: Tamanho: 2MB, Redução de ruído: 2560x2560px, Aumento de escala: 1280x1280px."
|
||||||
|
style: Estilo
|
||||||
|
artwork: Arte
|
||||||
|
photo: Foto
|
||||||
|
noise_reduction: Redução de ruído
|
||||||
|
expect_jpeg: Exceto artefato JPEG
|
||||||
|
nr_none: Nenhuma
|
||||||
|
nr_medium: Média
|
||||||
|
nr_high: Alta
|
||||||
|
nr_hint: "Quando usando a escala 2x, Nós nunca recomendamos usar um nível alto de redução de ruído, quase sempre deixa a imagem pior, faz sentido apenas para casos raros quando a imagem tinha uma qualidade muito má desde o começo."
|
||||||
|
upscaling: Aumento de escala
|
||||||
|
up_none: Nenhum
|
||||||
|
button_convert: Converter
|
||||||
|
button_download: Baixar
|
||||||
|
hints:
|
||||||
|
- "Se Você estiver usando o Firefox, por favor, aperte CTRL+S para salvar a imagem. A opção \"Salvar Imagem\" não funciona"
|
24
webgen/locales/ru.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
title: Waifu2x
|
||||||
|
description: "Waifu2x позволяет увеличивать в 4 раза рисованные изображения, например аниме или арт, а также устранять шум на изображении (преимущественно артефакты сжатия JPEG). Теперь также поддерживаются фотографии."
|
||||||
|
show_demonstration: Посмотреть полную демонстрацию
|
||||||
|
go_to_github: Перейти на GitHub
|
||||||
|
image_choosing: Выбор изображения
|
||||||
|
type_url: Укажите URL
|
||||||
|
choose_file: Либо выберите файл
|
||||||
|
file_limits: "Макс. размер файла — 2MB, устранение шума — макс. 2560x2560px, апскейл — 1280x1280px."
|
||||||
|
style: Тип изображения
|
||||||
|
artwork: Арт
|
||||||
|
photo: Фотография
|
||||||
|
noise_reduction: Устранение шума
|
||||||
|
expect_jpeg: артефактов JPEG
|
||||||
|
nr_none: Нет
|
||||||
|
nr_medium: Средне
|
||||||
|
nr_high: Сильно
|
||||||
|
nr_hint: "Устранение шума нужно использовать, если на картинке действительно есть шум, иначе это даст противоположный эффект."
|
||||||
|
upscaling: Апскейл
|
||||||
|
up_none: Нет
|
||||||
|
button_convert: Преобразовать
|
||||||
|
button_download: Скачать
|
||||||
|
hints:
|
||||||
|
- "Если Вы используете Firefox, для сохранения изображения нажмите Ctrl+S (перетаскивание изображения и опция \"Сохранить изображение\" работать не будут)."
|
148
webgen/templates/index.html.erb
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="<%= t[:lang] %>">
|
||||||
|
<!-- <%= t[:dont_make_change] %> -->
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<link rel="shortcut icon" href="favicon.ico"/>
|
||||||
|
<meta name="viewport" content="initial-scale=1.0,width=device-width">
|
||||||
|
<link href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="style.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="mobile.css" rel="stylesheet" type="text/css" media="screen and (max-width: 768px) and (min-width: 0px)">
|
||||||
|
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
|
||||||
|
<script type="text/javascript" src="ui.js"></script>
|
||||||
|
<title>waifu2x</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="all-page">
|
||||||
|
<h1 class="main-title">waifu2x</h1>
|
||||||
|
<div class="choose-lang">
|
||||||
|
<a href="index.html">
|
||||||
|
English
|
||||||
|
</a>
|
||||||
|
/
|
||||||
|
<a href="index.ja.html">
|
||||||
|
日本語
|
||||||
|
</a>
|
||||||
|
/
|
||||||
|
<a href="index.ru.html">
|
||||||
|
Русский
|
||||||
|
</a>
|
||||||
|
/
|
||||||
|
<a href="index.pt.html">
|
||||||
|
Português
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<p><%= t[:description] %></p>
|
||||||
|
<p class="margin1 link-box">
|
||||||
|
<a href="https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png" class="blue-link" target="_blank">
|
||||||
|
<%= t[:show_demonstration] %>
|
||||||
|
</a>
|
||||||
|
|
|
||||||
|
<a href="https://github.com/nagadomi/waifu2x" class="blue-link" target="_blank">
|
||||||
|
<%= t[:go_to_github] %>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
|
||||||
|
<div class="option-box first">
|
||||||
|
<div class="option-left"><%= t[:image_choosing] %>:</div>
|
||||||
|
<div class="option-right">
|
||||||
|
<input type="text" id="url" name="url" placeholder="<%= t[:type_url] %>">
|
||||||
|
<div class="option-right-small">
|
||||||
|
<%= t[:choose_file] %>:
|
||||||
|
<input type="file" id="file" name="file"></div>
|
||||||
|
</div>
|
||||||
|
<div class="option-hint">
|
||||||
|
<%= t[:file_limits] %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
<%= t[:style] %>:
|
||||||
|
</div>
|
||||||
|
<div class="option-right">
|
||||||
|
<label><input type="radio" name="style" class="radio" value="art" checked>
|
||||||
|
<span class="r-text">
|
||||||
|
<%= t[:artwork] %>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="style" class="radio" value="photo">
|
||||||
|
<span class="r-text">
|
||||||
|
<%= t[:photo] %>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
<%= t[:noise_reduction] %>:
|
||||||
|
<div class="option-left-small">
|
||||||
|
(<%= t[:expect_jpeg] %>)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-right">
|
||||||
|
<label><input type="radio" name="noise" class="radio" value="0">
|
||||||
|
<span class="r-text">
|
||||||
|
<%= t[:nr_none] %>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="noise" class="radio" value="1" checked>
|
||||||
|
<span class="r-text">
|
||||||
|
<%= t[:nr_medium] %>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="radio" name="noise" class="radio" value="2">
|
||||||
|
<span class="r-text">
|
||||||
|
<%= t[:nr_high] %>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="option-hint">
|
||||||
|
<%= t[:nr_hint] %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="option-box">
|
||||||
|
<div class="option-left">
|
||||||
|
<%= t[:upscaling] %>:
|
||||||
|
<div class="option-left-small"></div>
|
||||||
|
</div>
|
||||||
|
<div class="option-right">
|
||||||
|
<label><input type="radio" name="scale" class="radio" value="0" checked>
|
||||||
|
<span class="r-text">
|
||||||
|
<%= t[:up_none] %>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="scale" class="radio" value="1">
|
||||||
|
<span class="r-text">
|
||||||
|
1.6x
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label><input type="radio" name="scale" class="radio" value="2">
|
||||||
|
<span class="r-text">
|
||||||
|
2x
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% if t[:button_convert] && !t[:button_convert].empty? %>
|
||||||
|
<input type="submit" class="button" value="<%= t[:button_convert] %>">
|
||||||
|
<% else %>
|
||||||
|
<input type="submit" class="button">
|
||||||
|
<% end %>
|
||||||
|
<input type="submit" name="download" value="<%= t[:button_download]%>" class="button">
|
||||||
|
<div class="bottom-hint">
|
||||||
|
<ul>
|
||||||
|
<% t[:hints].each do |hint| %>
|
||||||
|
<li><%= hint %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-info">
|
||||||
|
<a href="https://github.com/nagadomi/waifu2x" class="gray-link" target="_blank">waifu2x</a>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|