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
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)
Parameter | Type | Description | Example |
---|---|---|---|
image | file | --- | test.png |
width | number | pixels | 200 |
height | number | pixels | 500 |
Parameter | Type | Description | Example |
---|---|---|---|
image | file | --- | test.png |
Parameter | Type | Description | Example |
---|---|---|---|
image | file | --- | test.png |