New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hfinder/imageai

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hfinder/imageai

Generate a hyper-realistic photo an anime style!

  • 1.0.0-hf.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
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

Package last updated on 18 Dec 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc