npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bimp

v1.0.0

Published

Barnebys Image Processor

Downloads

6

Readme

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

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

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