trimpng
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

trimPNG

trimPNG is a TypeScript function to remove transparent pixels from the borders of images

Installation

npm

npm install trimpng

Yarn

yarn add trimpng

Usage

import trimPNG from 'trimpng';

const imageElement = document.getElementsByTagName('img')[0];
const trimmedImageDataURL = trimPNG(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

Package Sidebar

Install

npm i trimpng

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

10.5 kB

Total Files

11

Last publish

Collaborators

  • benjijanssens