Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
This package uses the pre-built Windows x64 binaries from waifu2x-converter-cpp in order to upscale anime-styled images with node.js.
npm install waifu2x
import waifu2x from "waifu2x"
/*Upscale an image. If you specify a directory for the destination, the default name will be originalName2x.
You can optionally set the noise level (0/1/2/3), scale factor (default 2.0), pngCompression (0-9), and jpgWebpQuality (0-101).*/
waifu2x.upscaleImage("./images/laffey.png", "./images/upscaled/laffey2x.png", {noise: 2, scale: 2.0})
/*Recursively upscales all images in a directory. Set recursion to 1 to also upscale all images in all sub directories
(this is the default), or to 0 to only scale images in that specific folder. You can also optionally specify the
recursionFormat, which will be the format for all the converted images, and the rename, which will be appended to the
end of all the new filenames (default is 2x).*/
waifu2x.upscaleImages("./images", "./upscaled", {recursion: 1, rename: "2x"})
export type Waifu2xFormats =
| ".bmp"
| ".dib"
| ".exr"
| ".hdr"
| ".jpe"
| ".jpeg"
| ".jpg"
| ".pbm"
| ".pgm"
| ".pic"
| ".png"
| ".pnm"
| ".ppm"
| ".pxm"
| ".ras"
| ".sr"
| ".tif"
| ".tiff"
| ".webp"
export interface Waifu2XOptions {
noise?: 0 | 1 | 2 | 3
scale?: number
pngCompression?: number
jpgWebpQuality?: number
recursion?: 0 | 1
recursionFormat?: Waifu2xFormats
rename?: string
}
FAQs
2x upscaling of images with waifu2x
The npm package waifu2x receives a total of 290 weekly downloads. As such, waifu2x popularity was classified as not popular.
We found that waifu2x demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.