Yuv420Image.from constructor

Yuv420Image.from(
  1. Map<String, dynamic> map
)

Implementation

Yuv420Image.from(Map<String, dynamic> map)
    : this(
        cropRect: Rect.fromLTRB(
          map["cropRect"]["left"].toDouble(),
          map["cropRect"]["top"].toDouble(),
          map["cropRect"]["right"].toDouble(),
          map["cropRect"]["bottom"].toDouble(),
        ),
        height: map["height"],
        width: map["width"],
        planes: (map["planes"] as List<dynamic>)
            .map((e) => ImagePlane.from(Map<String, dynamic>.from(e)))
            .toList(),
        rotation: InputAnalysisImageRotation.values.byName(map["rotation"]),
        format: inputAnalysisImageFormatParser(map["format"]),
      );