https://github.com/geta/imageresizer.plugins.autocrop
Automatic cropping for images with a flat background
https://github.com/geta/imageresizer.plugins.autocrop
crop image-processing image-resizer jpg png
Last synced: about 2 months ago
JSON representation
Automatic cropping for images with a flat background
- Host: GitHub
- URL: https://github.com/geta/imageresizer.plugins.autocrop
- Owner: Geta
- License: other
- Created: 2019-09-07T22:36:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-25T14:33:31.000Z (over 3 years ago)
- Last Synced: 2025-02-08T17:44:39.702Z (3 months ago)
- Topics: crop, image-processing, image-resizer, jpg, png
- Language: C#
- Size: 1.46 MB
- Stars: 0
- Watchers: 20
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ImageResizer.Plugins.AutoCrop
* Master
,branch:master/statusIcon)## Description
Automatic cropping for images with a flat background.
Works with ImageResizer.NET 4.0.5 and above.Uses either a relative luminance tolerance or an edge detection filter to determine which area to crop.
Preserves intended aspect ratio of image.## Features
- Crops images with a flat background
- Configurable x and y padding
- Configurable treshold
- Configurable analysis method (color difference or edge detection)
- Can override FitMode of regular resizer## How to get started?
Requires ImageResizer 4.0.5 or above
- `install-package ImageResizer.Plugins.AutoCrop`
Will add the following to `web.config`
```
```
## Details
Plugin unlocks the ability to use the following query parameters for images
| Parameter | Description | Example |
| --------- | ----------- | ------- |
| autoCrop | activates the plugin with the provided values | _?autoCrop=10_ or _?autoCrop=10;20;30_ |
| _x-padding_ | the first provided parameter value | 10 |
| _y-padding_ | the second provided parameter value | 10;_20_ |
| _threshold_ | the third provided parameter value, background color deviation threshold | 10;20;_30_ |
| autoCropMode (optional) | overrides the fit mode if the autoCrop is successfully completed | _?autoCropMode=pad_ |
| autoCropMethod (optional) | determines which method to use (tolerance or edge) | _?autoCropMethod=tolerance_ |
| autoCropDebug (optional) | displays a debug visualisation of how the plugin evaluated instead of cropping | _?autoCropDebug=1_ |## Package maintainer
https://github.com/svenrog
## Changelog
[Changelog](CHANGELOG.md)