j2k 1.0.0
j2k: ^1.0.0 copied to clipboard
Pure Dart JPEG 2000 codec: decodes JP2 and J2K files to 8- or 16-bit pixels with alpha, encodes pixel buffers and PGM/PPM, and runs on the VM, dart2js and dart2wasm.
Use this package as an executable
Install it
You can install the package from the command line:
dart pub global activate j2kUse it
The package has the following executables:
$ jp2dec
$ jp2enc
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add j2kWith Flutter:
$ flutter pub add j2kThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
j2k: ^1.0.0Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:j2k/j2k.dart';