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

tiff

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiff

TIFF image decoder written entirely in JavaScript

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35K
decreased by-2.11%
Maintainers
2
Weekly downloads
 
Created
Source

tiff-js

NPM version build status npm download

TIFF image decoder written entirely in JavaScript

Installation

$ npm install tiff

Compatibility

Platform

This package is written using ES2015 features. It is natively compatible with recent versions of Google Chrome and Node.js. You can transpile it with a tool like babel if you need to support more JavaScript engines.

TIFF standard

Currently, only greyscale images (8, 16 or 32 bits) can be decoded.

API

The package is in early development and API should be considered entirely unstable.
I am currently only focused on extending TIFF format support and will work on the API afterwards.

new tiff.TIFFDecoder(ArrayBuffer|Buffer)

Returns a new decoder instance.

TIFFDecoder#decode()

Decodes the file and returns a TIFF instance.

TIFF object

The TIFF object has an ifd (Image File Directory) property which is an array containing all subimages.

IFD object

Each decoded image is stored in an IFD.

IFD#data

The data property is a Typed Array containing the pixel data. It is a Uint8Array for 8bit images, a Uint16Array for 16bit images and a Float32Array for 32bit images.

Other properties of IFD
  • size - number of pixels
  • width - number of columns
  • height - number of rows
  • bitsPerSample - bit depth
  • xResolution
  • yResolution
  • resolutionUnit

License

MIT

FAQs

Package last updated on 25 Apr 2016

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