ImageDecodeAcceleratorCapability.fromJson constructor

ImageDecodeAcceleratorCapability.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ImageDecodeAcceleratorCapability.fromJson(Map<String, dynamic> json) {
  return ImageDecodeAcceleratorCapability(
    imageType: ImageType.fromJson(json['imageType'] as String),
    maxDimensions:
        Size.fromJson(json['maxDimensions'] as Map<String, dynamic>),
    minDimensions:
        Size.fromJson(json['minDimensions'] as Map<String, dynamic>),
    subsamplings: (json['subsamplings'] as List)
        .map((e) => SubsamplingFormat.fromJson(e as String))
        .toList(),
  );
}