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

circle-image

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

circle-image

A promise-based library for circular cropping images. This package can create several sizes of the same image and save them to disk. Using any method of your choice, you could upload the files to S3 after processing is complete.

  • 1.0.43
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
55
increased by511.11%
Maintainers
1
Weekly downloads
 
Created
Source

Circle-Image

Github

Pull request and issues tracked here: https://github.com/eenewbsauce/circle-image

NPM

Official home on NPM: https://www.npmjs.com/package/circle-image

Install Dependencies

circle-image is based on ImageMagick. You can install it one of the following ways:

On Ubuntu

$ apt-get install ImageMagick

On Mac OS X

$ brew install ImageMagick

On CentOS

$ yum install ImageMagick

Installation

npm install circle-image --save

Usage

Make sure you have a folder called "uploads" in the root of your node application (ie: app.js). The image (imagepath) dimensions need to be larger than the biggest size specified in imageSizes below.

var images = require('circle-image');
var imageSizes = [125, 100, 30];
//uniqueId param is used to identify a user
//so use the primary key or something guaranteed to be unique
images.execute('imagepath', uniqueId, imageSizes).then(function (paths) {
  //array of circularized image paths
  console.log(paths[0]); //circle_user_{uniqueId}_125.png
})

Keywords

FAQs

Package last updated on 24 Oct 2015

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