Barnebys Image Processor
Simple service for image processing
How to run
$ yarn install $ yarn run start
To deploy this, run the following command.
$ now barnebys/bimp
Enter a secret and a no image url. Leave the env empty to disable signed url's and/or a no image url.
To specify the env upon deployment add the
$ now barnebys/bimp -e SECRET=MySecret -e NOT_FOUND_IMAGE_URL=https://someurl.com/image.jpg
How to use
| Parameter | Function |
| ------------- | ------------- |
w | Image width |
h | Image height |
crop | Cropping mode |
extract | Extract a region of the image |
trim | Trim "boring" pixels from all edges |
pad | Add padding |
bg | Add a color to replace alpha or padded area |
s | Signed hash |
Resize image to
height. When both height and width are use the image will be cropped to the specified size using center as default.
Crop the resized image to the exact specified size. Default is center.
Possible attributes are
Other strategies for corpping are:
entropy: focus on the region with the highest Shannon entropy.
attention: focus on the region with the highest luminance frequency, colour saturation and presenece of skin tones..
Extract a region of the image using using left, top, width and height. Set left and top as offset and width and height for dimensions to extract.
Trim "boring" pixels from all edges using a tolerance (maximum of 99).
Add padding to the image
Replace alpha channel, or padded area, with a color.
- More sharp features
- Add S3