icc_parser 0.1.5 copy "icc_parser: ^0.1.5" to clipboard
icc_parser: ^0.1.5 copied to clipboard

A pure-dart library used to parse ICC profiles and create color transformations based on them

Version codecov

Pure dart implementation of (a subset of) ICC 4.4 color profiles and transformations.

Features #

  • Parse ICC profiles (version 4.4 and lower)
  • Create color transformations from ICC profiles (not all tags are supported yet)

Getting started #

For publicly available color profiles, see ICC's website.

Usage #

final transformations = inputFiles.mapIndexed((index, e) {
  final bytes = ByteData.view(File(e).readAsBytesSync().buffer);
  final stream =
  DataStream(data: bytes, offset: 0, length: bytes.lengthInBytes);
  final profile = ColorProfile.fromBytes(stream);
  return ColorProfileTransform.create(
    profile: profile,
    isInput: index == 0,
    intent: ColorProfileRenderingIntent.perceptual,
    interpolation: ColorProfileInterpolation.tetrahedral,
    lutType: ColorProfileTransformLutType.color,
    useD2BTags: true,
  );
}).toList();
final cmm = ColorProfileCmm();

final finalTransformations = cmm.buildTransformations(transformations);

final color = cmm.apply(finalTransformations, Float64List.fromList([0, 0, 0, 0]));

Additional information #

This package is still under development and not all tags are supported yet. If you need a specific tag, please open an issue or a pull request.

1
likes
140
pub points
49%
popularity

Publisher

verified publisherchimerapps.com

A pure-dart library used to parse ICC profiles and create color transformations based on them

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

collection, fixnum, meta

More

Packages that depend on icc_parser