Releases: duniul/trim-image-data
Releases Β· duniul/trim-image-data
v2.1.0
v2.0.1
v2.0.0
2.0.0
Major Changes
-
BREAKING CHANGE:
trimColor
now 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
trimColor
should now return return true if you want the color
to be trimmed, so essentially the opposite of the previous behavior.
Minor Changes
trimColor
now 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()
.