Javascript library - CropImageByBorder_js

Javascript Library for Cropping Image by Border


This is a Javascript library for cropping images by the border.


When an image is used, there is a case where I wanted to simply crop the image by a script. In this Javascript library, the image is cropped by a border. The sample situation is as follows.

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.


<script src="cropImageByBorder_js.min.js"></script>

Or, using jsdelivr cdn

<script src=""></script>

You can see the detail of this at