ldd_tools 0.0.1 copy "ldd_tools: ^0.0.1" to clipboard
ldd_tools: ^0.0.1 copied to clipboard

ldd's collection of development tools, adding various functions from time to time

ldd_tools #

Convert an image into an image that the printer can recognize

Getting Started #

add to your pubspec.yaml

  ldd_tools: any

init #

initLddToolLib() add your main function

void main() {
  initLddToolLib(); // add this line
  runApp(const MyApp());
}

Image thresholding #

Convert images into image types that the printer can recognize

  Future<void> covertToImage(File file) async {
    try {
      final bfs = await file!.readAsBytes();
      bitmapImage = await lddCoverImageToLuma8(
          imageBuffer: bfs,
          thresholdValue: 128,
          width: 150,
          height: 150,
          thresholdType: LddThresholdType.binary,
          imageFormat: LddImageFormat.bmp);
      print(
          "cover result :${bitmapImage!.bitmap.length} ${bitmapImage!.width} ${bitmapImage!.height}");
      setState(() {});
    } catch (e) {
      print("err $e");
    }
  }

example

[]

0
likes
0
points
34
downloads

Publisher

verified publisheritbug.shop

Weekly Downloads

ldd's collection of development tools, adding various functions from time to time

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_rust_bridge, plugin_platform_interface

More

Packages that depend on ldd_tools