Tools of image utilities converter
Table of Contents
Install
Use the edge version
npm install --save github:Hidden-Finder/imageai
Before use this package, you must install Jimp or Sharp to the dependencies
Usage
import ImageAI from "@hfinder/imageai";
const converter = new ImageAI();
const converter = new ImageAI({
proxy: {
url: "http://101.32.184.53:3128",
chinese: true,
image: false,
},
});
const converter = new ImageAI({
...options,
retries: 100,
factor: 3,
randomize: false,
});
const imgBuf = fs.readFileSync("images.jpeg");
const imgUrl = "https://hfinder.net/images.jpeg";
const imgPath = "/path/to/image/images.jpeg";
const imgBase64 = "UklGRiqXAABXRUJQVlA4WAoAAAAQ...";
const image = imgBuf | imgUrl | imgPath | imgBase64;
Generate AI 2D
Generate photo to animes style
const buffer = await converter.ai2d(image);
const buffer = await converter.ai2d(image, "SINGLE");
From December 6
to December 15
the AI had been available only in China
or with Chinese proxies
.
Since December 16
the AI works
for the rest of the world (UPD: still doesn't work in some countries) again so using proxies is not needed
anymore, but it's limited and allows you to generate only one type of media.
Seems like it's impossible to find FREE
alive proxies. Don't waste
your time searching and just buy it somewhere
.
Convert Waifu 2x
Before use this function, you must install Form Data to the dependencies
Make an anime image become HD
const buffer = await converter.waifu2x(image);
const buffer = await converter.waifu2x(image, "HIGH");
const buffer = await converter.waifu2x(image, "MEDIUM", true);
License
MIT @Hidden-Finder