1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-27 17:00:52 +01:00

Added gitignore

This commit is contained in:
Nayam Amarshe 2023-04-09 09:24:08 +05:30
parent 2512f9c67e
commit 07290b2095
2 changed files with 111 additions and 1 deletions

3
.gitignore vendored
View File

@ -5,6 +5,8 @@
/.pnp
.pnp.js
/main/*.js
# testing
/coverage
@ -42,4 +44,3 @@ build-dir/
#vscode
.vscode/
main/*

109
main/utils/getArguments.js Normal file
View File

@ -0,0 +1,109 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBatchSharpenArguments = exports.getBatchArguments = exports.getDoubleUpscaleSecondPassArguments = exports.getDoubleUpscaleArguments = exports.getSingleImageSharpenArguments = exports.getSingleImageArguments = void 0;
const getSingleImageArguments = (inputDir, fullfileName, outFile, modelsPath, model, scale, gpuId, saveImageAs) => {
return [
"-i",
inputDir + "/" + fullfileName,
"-o",
outFile,
"-s",
scale == "2" ? "4" : scale,
"-m",
modelsPath,
"-n",
model,
gpuId ? `-g ${gpuId}` : "",
"-f",
saveImageAs,
];
};
exports.getSingleImageArguments = getSingleImageArguments;
const getSingleImageSharpenArguments = (inputDir, fullfileName, outFile, modelsPath, model, scale, gpuId, saveImageAs) => {
return [
"-i",
inputDir + "/" + fullfileName,
"-o",
outFile,
"-s",
scale,
"-x",
"-m",
modelsPath + "/" + model,
gpuId ? `-g ${gpuId}` : "",
"-f",
saveImageAs,
];
};
exports.getSingleImageSharpenArguments = getSingleImageSharpenArguments;
const getDoubleUpscaleArguments = (inputDir, fullfileName, outFile, modelsPath, model, gpuId, saveImageAs) => {
return [
"-i",
inputDir + "/" + fullfileName,
"-o",
outFile,
"-s",
"4",
"-m",
modelsPath,
"-n",
model,
gpuId ? `-g ${gpuId}` : "",
"-f",
saveImageAs,
];
};
exports.getDoubleUpscaleArguments = getDoubleUpscaleArguments;
const getDoubleUpscaleSecondPassArguments = (isAlpha, outFile, modelsPath, model, gpuId, saveImageAs) => {
return [
"-i",
isAlpha ? outFile + ".png" : outFile,
"-o",
isAlpha ? outFile + ".png" : outFile,
"-s",
"4",
"-m",
modelsPath,
"-n",
model,
gpuId ? `-g ${gpuId}` : "",
"-f",
isAlpha ? "" : saveImageAs,
];
};
exports.getDoubleUpscaleSecondPassArguments = getDoubleUpscaleSecondPassArguments;
const getBatchArguments = (inputDir, outputDir, modelsPath, model, gpuId, saveImageAs) => {
return [
"-i",
inputDir,
"-o",
outputDir,
"-s",
"4",
"-m",
modelsPath,
"-n",
model,
gpuId ? `-g ${gpuId}` : "",
"-f",
saveImageAs,
];
};
exports.getBatchArguments = getBatchArguments;
const getBatchSharpenArguments = (inputDir, outputDir, modelsPath, model, gpuId, saveImageAs) => {
return [
"-i",
inputDir,
"-o",
outputDir,
"-s",
"4",
"-x",
"-m",
modelsPath + "/" + model,
gpuId ? `-g ${gpuId}` : "",
"-f",
saveImageAs,
];
};
exports.getBatchSharpenArguments = getBatchSharpenArguments;