Gathering detailed insights and metrics for autocrop-worker
Gathering detailed insights and metrics for autocrop-worker
Gathering detailed insights and metrics for autocrop-worker
Gathering detailed insights and metrics for autocrop-worker
A simple, fast autocrop library which automagically crops the image. The cropping related functions and features are based on autocrop.js. This library offloads image processing work from main thread to workers using workerpool.
npm install autocrop-worker
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
19 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Jul 08, 2023
Latest Version
1.0.4
Package Id
autocrop-worker@1.0.4
Unpacked Size
178.86 kB
Size
93.79 kB
File Count
21
NPM Version
6.12.0
Node Version
12.13.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A simple, fast autocrop library which automagically crops the image. The cropping related functions are based on autocrop.js https://github.com/lqez/autocrop.js. This library offloads image processing work from main thread to workers using workerpool.
Demo site: https://johnpremkumar.github.io/autocrop-worker/demo/
1$ npm install autocrop-worker
1import autocrop from 'autocrop-worker' 2autocrop(<original_image_element>, (target_image_element), (options));
1// workerpool need to be loaded before autocrop-worker.min.js 2<script type="text/javascript" src="https://unpkg.com/workerpool@6.0.3/dist/workerpool.min.js"></script> 3<script type="text/javascript" src="https://unpkg.com/autocrop-worker@1.0.4/dist/autocrop-worker.min.js"></script> 4... 5<script> 6autocrop(<original_image_element>, (target_image_element), (options)); 7</script>
If target_image_element
is set null
, it will replace original_image_element
with the cropped result.
1const autoCropDefaultOptions = { 2 bgColor: '#FFFFFF', // Background color. 3 alphaTolerance: 20, // Pixels that are transparent than this value are considered transparent. 4 colorTolerance: 20, // Pixels similar to the background color are considered as the background. 5 invertTolerance: 0.90, // Invert the image if most of non-transparent pixels are background color. 6 margin: '2%', // Margin 7 allowInvert: true, // Allow invert if needed. 8 marker: 'cropped', // Add a marker attribute to prevent duplicated cropping. 9 version: boolean|string /* Defaults to current timestamp. Used for avoiding crossorigin taint issues due to previous cache. 10 Set it to false for dataURL and blobs */ 11};
HackerKid
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/19 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
19 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More