Filters

If you have any doubts on how to use this, make sure you read our Getting Started guide.

  • :options is one of the fragments available for use on ImageBoss API.

Threshold

Any pixel value greater than or equal to the threshold value will be set to 255; otherwise, it will be set to 0. Thresholding is the simplest method of image segmentation. From a grayscale image, it can be used to create binary images. You can combine this option with any available operation.

threshold accepts two values: :amount (1–255) and :grayscale (boolean).

API Examples

https://img.imageboss.me /with /700 /threshold:125 /examples/05.jpg

https://img.imageboss.me /with /700 /threshold:125-true /examples/05.jpg


Using ImageBoss Web Library

<img
    src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="
    data-imageboss-src="/examples/02.jpg"
    data-imageboss-operation="width"
    data-imageboss-options="threshold:125"
    width="700"
/>

Original
Modified
Modified (grayscale: true)