1.0.7 • Published 3 years ago

trim-image-dataurl v1.0.7

Weekly downloads
11
License
MIT
Repository
github
Last release
3 years ago

trim-image-dataurl

trim-image-dataurl is a TypeScript function to remove transparent pixels from the borders of images

Installation

npm

npm install trim-image-dataurl

Yarn

yarn add trim-image-dataurl

Usage

import trimImage from 'trim-image-dataurl';

const imageElement = document.getElementsByTagName('img')[0];
const trimmedImageDataURL = trimImage(imageElement);
imageElement.src = trimmedImageDataURL;

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago