dart_lut 0.0.4+hotfix.1

Dart native js
Flutter Android iOS web

The implementation of image processing via 3D LUT (LookUp Tables). It's written on the pure Dart language so that it can be used with Flutter, CLI and web.

Dart LUT3D #

pub package Build Status

The library for working with LUTs.

License #

project under MIT license

Changelogs #

full changelog

Task List #

  • [x] Basic impl.
  • [x] Read .cube files
  • [ ] Read another formats
  • [x] Store 3DLUT
  • [ ] Generate LUTs by expression
  • [x] Verifying LUTs
  • [x] Applying 3D LUTs
  • [ ] Applying 1D LUTs
  • [ ] Optimize perfomance
  • [x] Trilinear interpolation
  • [x] More tests
  • [ ] Documentation
  • [x] Publish to PUB
  • [ ] Remove task list

0.0.4 #

  • more tests
  • fixed wrong equalification of Colour class
  • error handling while parsing LUT
  • added travis integration
  • some minor changes

Instalation #

add dependency in pubsec.yaml

from pub.dartlang.org:

dependencies:
  dart_lut: ^0.0.4

latest from github.com:

dependencies:
  dart_lut:
      git: git://github.com/NiKoTron/dart-lut.git

Usage #

generic example:

import 'dart:io';

import 'package:image/image.dart';
import 'package:dart_lut/src/lut.dart';
final lut = LUT.fromString(File('example.cube').readAsStringSync());
final isLoaded = await lut
    .awaitLoading()
    .timeout(Duration(milliseconds: 1500), onTimeout: () => false);

if (isLoaded) {
  final image = decodeImage(imageFile.readAsBytesSync());
  var lutedBytes = lut.applySync(image.getBytes());

  var imageLUT = Image.fromBytes(image.width, image.height, lutedBytes);
  var outputFile = File('out.jpg')..writeAsBytesSync(encodeJpg(imageLUT));
}
lut.applyAsStream(image.getBytes()).listen((result) {
  print('#${result.toRadixString(16).padLeft(4, '0')}'); //print ARGB value after applying LUT in HEX format
});

Sample results #

Photo by Caique Silva on Unsplash

image by Caique Silva LUTs: KURO B&W by David Morgan Jones, Arabica 12 and Lenox 340 by rocketstock

Photo by sean Kong on Unsplash

image by sean Kong LUTs: KURO B&W by David Morgan Jones, Arabica 12 and Lenox 340 by rocketstock

3
likes
100
pub points
23%
popularity

Publisher

dart.tools

The implementation of image processing via 3D LUT (LookUp Tables). It's written on the pure Dart language so that it can be used with Flutter, CLI and web.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on dart_lut