@invertase/image-processing-api
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i @invertase/image-processing-api

Weekly Downloads

197

Version

0.1.0

License

Apache-2.0

Unpacked Size

94.9 kB

Total Files

40

Last publish

Collaborators

  • cabljac
  • dackers86
  • salakar
  • ehesp