resize method
Method for Basic Transformations
height
: height (Default: 0)width
: width (Default: 0)fit
: TFit (Default: cover)background
: background (Default: "000000")position
: TPosition (Default: center)algorithm
: TAlgorithm (Default: lanczos3)dpr
: DPR (Default: 1) Returns TransformationData.
Implementation
TransformationData resize(
int? height,
int? width,
TFit? fit,
String? background,
TPosition? position,
TAlgorithm? algorithm,
double? dpr,
) {
var values = <String, String>{};
if (height != null) {
values['h'] = height.toString();
}
if (width != null) {
values['w'] = width.toString();
}
if (fit != null) {
values['f'] = fit.value;
}
if (background != null && background.isNotEmpty) {
values['b'] = background;
}
if (position != null) {
values['p'] = position.value;
}
if (algorithm != null) {
values['k'] = algorithm.value;
}
if (dpr != null) {
values['dpr'] = dpr.toString();
}
return TransformationData(plugin: 't', name: 'resize', values: values);
}