easy_lut 0.2.1 copy "easy_lut: ^0.2.1" to clipboard
easy_lut: ^0.2.1 copied to clipboard

Dart package to easily apply LUT for images. You can use LUT files with 1, 3 or 6 columns of data.

A dart package to use LUT files.

Features #

  • Parse 1D LUT files
    • Use TITLE line to get title (default is the filename)
  • Parse 3D LUT files
    • Use TITLE line to get title (default is the filename)
    • 3 columns and 6 columns formats are also supported
  • Parse LUT "images"
    • only png
  • Apply LUTs on Images with image package

Usage #

The goal was to make LUT applying simple. So you only have to use about 2 methods.

import 'package:easy_lut/easy_lut.dart';

void main() async {
  final easyLUT = EasyLUT();
  
  final lut = await easyLUT.parseLUTWithPath('path_of_your_lut.cube');
  final filteredImageData = await easyLUT.applyLUTonPath(lut, 'your_image_path');
  
  print('${lut.title} lut applied on image');
}

Available methods #

An EasyLUT object has the following public methods.

/// Parse LUT data with file path
Future<LUT> parseLUTWithPath(String path)

/// Parse LUT data with file path
Future<LUT> parseLUTWithFile(File file)


/// Apply LUT data on imageData and returns with the result imageData
Uint8List? applyLUT(LUT lut, Uint8List imageData)

///  Apply LUT data on file
/// The original file will not change
/// returns with the result imageData
Future<Uint8List?> applyLUTonFile(LUT lut, File file)

/// Apply LUT data on file path
/// The original file will not change
/// returns with the result imageData
Future<Uint8List?> applyLUTonPath(LUT lut, String path)

/// Converts 3D LUT to image
Uint8List convertLUTtoBMP(ThreeDimensionLUT lut)

Additional information #

It's only the minimal functionality I needed at this moment. Feel free to contact me or create tickets on GitHub. I didn't test it with video stream so I'm not sure it's working fast enough to applying filter on that.

1
likes
160
pub points
54%
popularity

Publisher

unverified uploader

Dart package to easily apply LUT for images. You can use LUT files with 1, 3 or 6 columns of data.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

image

More

Packages that depend on easy_lut