jpeg2000
v1.1.1
Published
JPEG 2000 image decoder in JavaScript
Downloads
834
Maintainers
Readme
jpeg2000
This module helps with decoding the JPEG 2000 code stream. All in vanilla javascript with no dependencies. Typings included.
import { JpxImage } from 'jpeg2000'
const codestream = Buffer.from('ff4fff5100290000...', 'hex')
const jpx = new JpxImage()
jpx.parse(codestream)
console.log('width: %d', jpx.width)
console.log('height: %d', jpx.height)
console.log('components: %d', jpx.componentsCount)
console.log('tiles:')
console.log(jpx.tiles)
Credits
This library is heavily based on Mozilla's PDF.js source code.