Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bimp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bimp

Barnebys Image Processor

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Simple service for image processing

Image processing service based on Sharp and Micro.

How to run

$ yarn install
$ yarn run start

Deployment

We recommend to use Now together with Now CDN. See Now CDN documentation for setup.

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 -e flag

$ now barnebys/bimp -e SECRET=MySecret -e NOT_FOUND_IMAGE_URL=https://someurl.com/image.jpg

How to use

https://<your-fqdn>/<url-or-path>?w=<width>&h=<height>&crop=<mode>

Available parameters

ParameterFunction
wImage width
hImage height
cropCropping mode
extractExtract a region of the image
trimTrim "boring" pixels from all edges
padAdd padding
bgAdd a color to replace alpha or padded area
sSigned hash

Resizing

Resize image to width x height. When both height and width are use the image will be cropped to the specified size using center as default.

Cropping

Crop the resized image to the exact specified size. Default is center.

Possible attributes are north, northeast, east, southeast, south, southwest, west, northwest, center, centre, entropy and attention.

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

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.

extract=<left>,<top>,<width>,<height> extract=0,0,500,200

Trim

Trim "boring" pixels from all edges using a tolerance (maximum of 99).

trim=10

Pad

Add padding to the image

pad=50

Background

Replace alpha channel, or padded area, with a color.

bg=ffffff

bg=000000f1

Clients

Bimp PHP Client

Roadmap

  • More sharp features
  • Add S3

FAQs

Package last updated on 05 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc