0.0.1-alpha.4 • Published 2 years ago

@image-auto-crop/core v0.0.1-alpha.4

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

@image-auto-crop/core

The core package of image-auto-crop.

It is recommended to use one of the wrappers, rather than use this package directly:

Install

npm i @image-auto-crop/core

Usage

This package provides a autoCropImage function which takes the path of the image (the src attribute of an img element) and returns the cropped image data as a base64 string:

import { autoCropImage } from '@image-auto-crop/core';

...

const src = 'example.png';
const imageData = await autoCropImage(src);
console.log(imageData);
// data:image/png;base64,iVBOR...
0.0.1-alpha.4

2 years ago

0.0.1-alpha.3

2 years ago

0.0.1-alpha.2

2 years ago

0.0.1-alpha.1

2 years ago