1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-30 18:24:27 +01:00
upscayl/electron/utils.ts
2022-11-12 02:17:00 +05:30

24 lines
447 B
TypeScript

import { spawn } from "child_process";
import { execPath } from "./binaries";
function upscaylImage(
inputFile: string,
outFile: string,
modelsPath: string,
model: string
) {
// UPSCALE
let upscayl = spawn(
execPath("realesrgan"),
["-i", inputFile, "-o", outFile, "-s", "4", "-m", modelsPath, "-n", model],
{
cwd: undefined,
detached: false,
}
);
return upscayl;
}
module.exports = { upscaylImage };