-
Add
getTrimEdges()
function, which returns the calculated edges of the trim without cropping the#5
a159cad2f62fa19609a0e34c8e2bb28d5159c14c
@duniulimage.
- Add typedocs to exported types and functions.
#5
10439df12807acd0d5683b927e725256c45579f3
@duniul
-
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.
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:
- Fix default behavior of
trimImageData()
.
- Only include built files in the package.