lddCoverImageToLuma8 function

Future<BitmapImage> lddCoverImageToLuma8({
  1. required List<int> imageBuffer,
  2. int? width,
  3. int? height,
  4. int? thresholdValue,
  5. LddThresholdType? thresholdType,
  6. LddImageFormat? imageFormat,
})

图片转单位色图 `image_buffer` 图片的字节数据 `width` 转换后目标宽度 `height` 转换后的目标高度 `threshold_value` 将图像阈值化,转换为单色图像程度,一般是 128 `threshold_type` 阈值化转换逻辑类型, 详见枚举`LddThresholdType`,默认是Binary `image_format` 转换后的目标图片类型, 详见枚举`LddImageFormat`,默认是bmp

Implementation

Future<BitmapImage> lddCoverImageToLuma8(
        {required List<int> imageBuffer,
        int? width,
        int? height,
        int? thresholdValue,
        LddThresholdType? thresholdType,
        LddImageFormat? imageFormat}) =>
    RustLib.instance.api.crateApiImageLddCoverImageToLuma8(
        imageBuffer: imageBuffer,
        width: width,
        height: height,
        thresholdValue: thresholdValue,
        thresholdType: thresholdType,
        imageFormat: imageFormat);