waifu2x
Version:
2x upscaling of images with waifu2x
12 lines (11 loc) • 492 B
text/typescript
import waifu2x from "./waifu2x"
import path from "path"
const start = async () => {
const progress = (current: number, total: number) => {
console.log(`${current}/${total}`)
}
const result = await waifu2x.upscalePDF("./images/pdfs/pdf.pdf", "./images/pdfs/pdf2.pdf", {downscaleHeight: 1000})
//const result = await waifu2x.upscaleImage("./images/img.png", "./images/upscale/img2x.png", {upscaler: "real-esrgan", scale: 4})
console.log(result)
}
start()