Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/runk/jpeg2000
https://github.com/runk/jpeg2000
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/runk/jpeg2000
- Owner: runk
- License: apache-2.0
- Created: 2023-01-05T00:35:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-08T09:09:49.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T18:07:07.468Z (3 months ago)
- Language: JavaScript
- Size: 74.2 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.