Repository navigation
Releases: duniul/trim-image-data
Releases Β· duniul/trim-image-data
Release list
v2.1.0
v2.0.1
v2.0.0
2.0.0
Major Changes
-
BREAKING CHANGE:
trimColornow accepts an RGBA array instead of an object.- Before:
trimColor: ({ red, blue, green, alpha }) => { ... } - Now:
trimColor: ([red, blue, green, alpha]) => { ... }
- Before:
-
BREAKING CHANGE: the response of
trimColorshould now return return true if you want the color
to be trimmed, so essentially the opposite of the previous behavior.
Minor Changes
trimColornow also accepts a single RGBA-array as a shorthand for a callback that returnstrue
if all channels are equal to the corresponding value in the array.- Example:
trimColor: [255, 255, 255, 255](would trim white pixels)
- Example:
Patch Changes
- Fix default behavior of
trimImageData().