jpeg2000 0.1.4
jpeg2000: ^0.1.4 copied to clipboard
JPEG 2000 decoder written in pure Dart with no runtime dependencies. The code is a port of runk/jpeg2000 javascript module.
import 'dart:typed_data';
import 'package:jpeg2000/jpeg2000.dart';
void main() {
final codestream = Uint8List.fromList([
0xff, 0x4f, 0xff, 0x51, 0x00, 0x29, 0x00, 0x00,
// ...
]);
final jpx = JpxImage();
jpx.parse(codestream);
print('width: ${jpx.width}');
print('height: ${jpx.height}');
print('components: ${jpx.componentsCount}');
print('tiles:');
print(jpx.tiles);
}