Skip to content

eyedea-io/syncano-socket-gm

Repository files navigation

Syncano Socket for Graphics Magick library

Syncano Socket CircleCI branch Codecov branch JavaScript Style Guide npm license

Main Socket features:

  • resize — Resize image by width and height keeping original aspect ratio
  • sepia — Apply sepia filter to an image
  • monochrome — Apply monochromatic filter to an image

Getting Started

Install package in your project:

cd my_project
npm install @syncano/cli --save-dev
npm install @eyedea-sockets/graphics-magic --save
npx s deploy

Use it:

import Syncano from '@syncano/client'

const s = new Syncano('instance_name')
const image  = require('./img')
const params = {
  width: 200,
  height: 300
}
const resizeImage = await s.post('graphics-magic/resize',image, params)

Endpoints

graphics-magic/resize

Input:

Parameter Type Description Example
image file --- test.png
width number pixels 200
height number pixels 500

graphics-magic/resize

Parameter Type Description Example
image file --- test.png

graphics-magic/resize

Parameter Type Description Example
image file --- test.png

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published