Socket
Socket
Sign inDemoInstall

@invertase/image-processing-api

Package Overview
Dependencies
1
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @invertase/image-processing-api

A JavaScript utility library for the Firebase Image Processing API Extension.


Version published
Weekly downloads
80
decreased by-24.53%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

Image Processing API Utilities

This package contains utilities for interacting with the Firebase Image Processing API Extension.

Installation

npm i --save @invertase/image-processing-api

Usage

builder

Returns a ImageProcessingApi instance which can be used to build an array of operations to be applied to an image via the extension.

import { builder } from '@invertase/image-processing-api';

const output = builder()
  // Input required
  .input({
    source: 'https://example.com/image.jpg',
  })
  .flip()
  .grayscale()
  .rotate({ angle: 90 })
  // Output required
  .output({
    format: 'png',
  });

Once created, the api provides the means to return the operations as JSON, a JSON string or an encoded JSON string suitable for GET requests in your browser.

const json = output.toJSON();
const jsonString = output.toJSONString();
const encodedJsonString = output.toEncodedJSONString();

FAQs

Last updated on 22 Sep 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc