New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@shumai/image

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shumai/image

A thin wrapper over libvips integrated with Shumai's native tensor type. For use with the Bun runtime.

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
3
Weekly downloads
 
Created
Source

Shumai Image

A thin wrapper over libvips integrated with Shumai's native tensor type. For use with the Bun runtime.

Install:

$ brew install libvips
$ bun install @shumai/image

Usage:

import * as sm from '@shumai/shumai'
import { Image } from '@shumai/image'

// open images from files
let img = new Image('input.png')

// functional API
img = img.sharpen(2)

// allows chaining
img = img.resize(2).sobel().invert().rotate(14).gaussblur(3)

// convert to Shumai tensor
let t = img.tensor().div(sm.scalar(2))

// manipulate image as a tensor and convert back
t = t.div(sm.scalar(2)).add(sm.scalar(40))
img = new Image(t)

// save the output to file
img.save('output.jpg')

Keywords

FAQs

Package last updated on 28 Dec 2022

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