Socket
Socket
Sign inDemoInstall

@hfinder/imageai

Package Overview
Dependencies
146
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hfinder/imageai

Generate a hyper-realistic photo an anime style!


Version published
Maintainers
3
Created

Readme

Source

npm version install size npm downloads

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";

// default with options
const converter = new ImageAI();

// with proxy options
const converter = new ImageAI({
  proxy: {
    url: "http://101.32.184.53:3128",
    chinese: true,
    image: false,
  },
});

// with async retry options
const converter = new ImageAI({
  ...options,
  retries: 100,
  factor: 3,
  randomize: false,
});

// image source
const imgBuf = fs.readFileSync("images.jpeg");
const imgUrl = "https://hfinder.net/images.jpeg";
const imgPath = "/path/to/image/images.jpeg";
const imgBase64 = "UklGRiqXAABXRUJQVlA4WAoAAAAQ...";

// Can be valid: Buffer, url, path, or base64
const image = imgBuf | imgUrl | imgPath | imgBase64;

Generate AI 2D

Generate photo to animes style

// default
const buffer = await converter.ai2d(image);

// crop the image, "COMPARED" | "SINGLE"
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

// default
const buffer = await converter.waifu2x(image);

// noice reduction, "MEDIUM" | "HIGH"
const buffer = await converter.waifu2x(image, "HIGH");

// scale the image?
const buffer = await converter.waifu2x(image, "MEDIUM", true);

License

MIT @Hidden-Finder

Keywords

FAQs

Last updated on 18 Dec 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc