upscale method

TransformationData upscale(
  1. SrType? type,
  2. bool? enhanceFace,
  3. SrModel? model,
  4. bool? enhanceQuality,
)

Method for Super Resolution Module

  • type : SrType (Default: 2x)
  • enhanceFace : Enhance Face (Default: false)
  • model : SrModel (Default: Picasso)
  • enhanceQuality : Enhance Quality (Default: false) Returns TransformationData.

Implementation

TransformationData upscale(
  SrType? type,
  bool? enhanceFace,
  SrModel? model,
  bool? enhanceQuality,
) {
  var values = <String, String>{};
  if (type != null) {
    values['t'] = type.value;
  }
  if (enhanceFace != null) {
    values['enhance_face'] = enhanceFace.toString();
  }
  if (model != null) {
    values['model'] = model.value;
  }
  if (enhanceQuality != null) {
    values['enhance_quality'] = enhanceQuality.toString();
  }
  return TransformationData(plugin: 'sr', name: 'upscale', values: values);
}