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

@imgly/background-removal

Package Overview
Dependencies
Maintainers
7
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@imgly/background-removal - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

dist/5fd9e75c3bb1f31c2207.wasm

1

dist/bundle.d.ts

@@ -6,4 +6,5 @@ export { preload, fetchKey as fetch };

size: number;
mime: string;
};
declare function fetchKey(key: string, config: Config): Promise<Blob>;
declare function preload(config: Config): Promise<Map<string, Entry>>;

2

dist/utils.d.ts

@@ -6,3 +6,3 @@ export { imageDecode, imageEncode, imageBitmapToImageData, imageDataResize, imageDataToFloat32Array, calculateProportionalSize, isAbsoluteURL, ensureAbsoluteURL, imageSourceToImageData };

declare function imageDataResize(imageData: ImageData, newWidth: number, newHeight: number): Promise<ImageData>;
declare function imageDataToFloat32Array(image: ImageData): Float32Array;
declare function imageDataToFloat32Array(image: ImageData, mean?: number[], std?: number[]): Float32Array;
declare function calculateProportionalSize(originalWidth: number, originalHeight: number, maxWidth: number, maxHeight: number): [number, number];

@@ -9,0 +9,0 @@ declare function isAbsoluteURL(url: string): boolean;

{
"name": "@imgly/background-removal",
"version": "1.0.2",
"version": "1.0.3",
"description": "Background Removal in the Browser",

@@ -50,3 +50,3 @@ "keywords": [

"lodash": "^4.17.21",
"onnxruntime-web": "~1.15.0",
"onnxruntime-web": "^1.15.1",
"ts-loader": "^9.4.3",

@@ -53,0 +53,0 @@ "tslib": "^2.5.3",

@@ -10,15 +10,19 @@ # Background Removal in the Browser

## News
- **`June 28th, 2023`:** We released the code of Background Removal JS.
## Overview
@imgly/background-removal is a powerful npm package that allows developers to seamlessly remove the background from images directly in the browser. With its unique features and capabilities, this package offers an innovative and cost-effective solution for background removal tasks without compromising data privacy.
`@imgly/background-removal` is a powerful npm package that allows developers to seamlessly remove the background from images directly in the browser. With its unique features and capabilities, this package offers an innovative and cost-effective solution for background removal tasks without compromising data privacy.
The key features of @imgly/background-removal are:
The key features of `@imgly/background-removal` are:
- **In-Browser Background Removal**: Our one-of-a-kind solution performs the entire background removal process directly in the user's browser, eliminating the need for additional server costs. By leveraging the computing power of the local device, users can enjoy a fast and efficient background removal process.
- **Data Protection**: As @imgly/background-removal runs entirely in the browser, users can have peace of mind knowing that their images and sensitive information remain secure within their own devices. With no data transfers to external servers, data privacy concerns are effectively mitigated.
- **Data Protection**: As `@imgly/background-removal` runs entirely in the browser, users can have peace of mind knowing that their images and sensitive information remain secure within their own devices. With no data transfers to external servers, data privacy concerns are effectively mitigated.
- **Seamless Integration with IMG.LY's CE.SDK**: @imgly/background-removal provides seamless integration with [IMG.LY's CE.SDK](https://img.ly/creative-sdk?utm_source=github&utm_medium=project&utm_campaign=bg-removal), allowing developers to easily incorporate powerful in-browser image matting and background removal capabilities into their projects.
- **Seamless Integration with IMG.LY's CE.SDK**: `@imgly/background-removal` provides seamless integration with [IMG.LY's CE.SDK](https://img.ly/products/creative-sdk?utm_source=github&utm_medium=project&utm_campaign=bg-removal), allowing developers to easily incorporate powerful in-browser image matting and background removal capabilities into their projects.
The Neural Network ([ONNX model](https://onnx.ai/)) and WASM files used by @imgly/background-removal is hosted on [UNPKG](https://www.unpkg.com/), making it readily available for download to all users of the library. See section Custom Asset Serving if you want to host data on your own servers.
The Neural Network ([ONNX model](https://onnx.ai/)) and WASM files used by `@imgly/background-removal` are hosted on [UNPKG](https://www.unpkg.com/), making it readily available for download to all users of the library. See the section Custom Asset Serving if you want to host data on your own servers.

@@ -32,3 +36,3 @@ <p align="center">

You can install @imgly/background-removal via npm or yarn. Use the following commands to install the package:
You can install `@imgly/background-removal` via npm or yarn. Use the following commands to install the package:

@@ -64,3 +68,3 @@ ### NPM

debug: bool; // enable or disable useful console.log outputs
proxyToWorker: bool; // Wether or wether not to proxy the calculations to a webworker. (Default true)
proxyToWorker: bool; // Whether to proxy the calculations to a web worker. (Default true)
model: 'small' | 'medium'; // The model to use. (Default "medium")

@@ -72,3 +76,3 @@ };

The onnx model is shipped in various size and needs.
The onnx model is shipped in various sizes and needs.

@@ -92,3 +96,3 @@ - small (~40 MB) is the smallest model and is in most cases working fine but sometimes shows some artifacts. It's a quantized model.

The performance is largely dependend on the feature set available. Most promintently, ensure that `SharedArrayBuffer` is available [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer). Due to the security requirements of `SharedArrayBuffer` two headers need to be set to cross-origin isolate your site:
The performance is largely dependent on the feature set available. Most prominently, ensure that `SharedArrayBuffer` is available [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer). Due to the security requirements of `SharedArrayBuffer` two headers need to be set to cross-origin isolate your site:

@@ -153,5 +157,5 @@ ```typescript

@imgly/background-removal is ideal for developers and projects that require efficient and cost-effective background removal directly in the browser. It caters to a wide range of use cases, including but not limited to:
`@imgly/background-removal` is ideal for developers and projects that require efficient and cost-effective background removal directly in the browser. It caters to a wide range of use cases, including but not limited to:
- _E-commerce applications_ that need to remove backgrounds from product images in real-time.
- _E-commerce applications_ that need to remove backgrounds from product images in real time.

@@ -162,3 +166,3 @@ - _Image editing applications_ that require background removal capabilities for enhancing user experience.

Whether you are a professional developer or a hobbyist, @imgly/background-removal empowers you to deliver impressive applications and services with ease.
Whether you are a professional developer or a hobbyist, `@imgly/background-removal` empowers you to deliver impressive applications and services with ease.

@@ -165,0 +169,0 @@ ## License

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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