jimp icon indicating copy to clipboard operation
jimp copied to clipboard

Wanted convolution edgeHandling example

Open mikakaraila opened this issue 2 years ago • 2 comments

Expected Behavior

How to use convolution function optional parameters like edgeHandling.

Current Behavior

No clear or working example.

Failure Information (for bugs)

TypeScript interface seems to need string, but Jimp.EDGE_WRAP etc. are defined as numbers. Convolution code itself expects function as callback.

Steps to Reproduce

  • Jimp Version: 0.16.1
  • Operating System: Windows 10
  • Node version: nodev12.16.2

Failure Logs

mikakaraila avatar Aug 03 '21 12:08 mikakaraila

https://github.com/oliver-moran/jimp/blob/53ff9d1266207f7f674233f465ec358274510511/packages/plugin-color/test/convolution.test.js#L95

It expects a number, but the type is defined as string.

kevinforrestconnors avatar Jul 27 '22 00:07 kevinforrestconnors

@mikakaraila to fix, you can cast it to a string. But this could be fixed..

kevinforrestconnors avatar Jul 27 '22 00:07 kevinforrestconnors