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

@atem-connection/image-tools

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atem-connection/image-tools

Native tools for atem-connection

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

ATEM connection image tools

Node CI npm

Usage

This library is intended to be used as optional optimisations for atem-connection NPM Github. It provides some image utilities with compiled (rust) implementations, which can be used instead of the javascript implementations used elsewhere.

Example:

import { Atem } from 'atem-connection'
import * as fs from 'fs'
import { encodeImageForAtem } from '@atem-connection/image-tools'

const conn = new Atem()

const file = fs.readFileSync('./testframe.rgba')

const encodedImage = encodeImageForAtem(1920, 1080, file, 'rgba')
conn.uploadStill(0, encodedImage, 'Test image', '').then(() => {
	console.log('Uploaded!')
})

// Or the less efficient method, with 'atem-connection' performing the colour conversion:
conn.uploadStill(1, file, 'Test image', '').then(() => {
	console.log('Uploaded!')
})

Development

Setting up

  • Clone the repository
  • Install a compatible version of nodejs and yarn
  • Install the rust compiler with rustup
  • Build the project with yarn build
  • You can use yarn link to link this into atem-connection

Modifying the rust code

To rebuild the native component you can run yarn build:rs. If you are changing the exposed api, you should instead run yarn build, so that typescript can check the new typings.

There are some rust unit tests, which can be run with yarn unit:rs, or you can run all the unit tests with yarn unit (make sure to rebuild the module first!).

Modifying the js code

You can run yarn build:js to rebuild the typescript code, optionally with the --watch parameter to re-run upon saving a file.

There are some unit tests, which can be run with yarn unit:js. This command calls into jest, so any jest arguments can also be used

FAQs

Package last updated on 25 Jan 2024

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