GithubHelp home page GithubHelp logo

nikotron / dart-lut Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 6.0 978 KB

The image processing library via 3d LUT that's written on the pure dart language.

Home Page: https://pub.dartlang.org/packages/dart_lut

License: MIT License

Dart 97.91% Shell 2.09%
dart flutter lut image-processing 3d-luts 3dlut library foss color colors

dart-lut's Introduction

Dart LUT3D

pub package Build Status

The library for working with LUTs.

License

project under MIT license

Changelogs

full changelog

Task List

  • Basic impl.
  • Read .cube files
  • Read another formats
  • Store 3DLUT
  • Generate LUTs by expression
  • Verifying LUTs
  • Applying 3D LUTs
  • Applying 1D LUTs
  • Optimize perfomance
  • Trilinear interpolation
  • More tests
  • Documentation
  • 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

dart-lut's People

Contributors

nikotron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dart-lut's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.