0.0.1-alpha.4 • Published 8 months ago

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

Weekly downloads
-
License
-
Repository
-
Last release
8 months 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

8 months ago

0.0.1-alpha.3

8 months ago

0.0.1-alpha.2

8 months ago

0.0.1-alpha.1

8 months ago