Skip to content

v2.0.0

Compare
Choose a tag to compare
@duniul duniul released this 27 Mar 21:01

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]) => { ... }
  • 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 returns true
    if all channels are equal to the corresponding value in the array.
    • Example: trimColor: [255, 255, 255, 255] (would trim white pixels)

Patch Changes

  • Fix default behavior of trimImageData().