In this sample situation, a red rectangle is enclosed by a border (1 pixel) with “#000000”. By this border, this library crops the red rectangle. In this case, the 1-pixel border is not included in the resulting image.
Or, using jsdelivr cdn
You can see the detail of this at https://github.com/tanaikech/CropImageByBorder_js