JpegImage.from constructor

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

Implementation

JpegImage.from(Map<String, dynamic> map)
    : this(
        bytes: map["jpegImage"],
        height: map["height"],
        width: map["width"],
        rotation: InputAnalysisImageRotation.values.byName(map["rotation"]),
        format: inputAnalysisImageFormatParser(map["format"]),
        cropRect: map["cropRect"] != null
            ? Rect.fromLTRB(
                map["cropRect"]["left"].toDouble(),
                map["cropRect"]["top"].toDouble(),
                map["cropRect"]["right"].toDouble(),
                map["cropRect"]["bottom"].toDouble(),
              )
            : null,
      );