Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/runk/jpeg2000


https://github.com/runk/jpeg2000

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# jpeg2000

This module helps with decoding JPEG 2000 code stream. All in vanilla javascript with no dependencies. Typings included.

```javascript
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](https://github.com/mozilla/pdf.js) source code.