ResizeWithCropOrPadOp constructor

ResizeWithCropOrPadOp(
  1. int _targetHeight,
  2. int _targetWidth, [
  3. int? _cropLeft,
  4. int? _cropTop,
])

Creates a ResizeWithCropOrPadOp which could crop/pad images to height: _targetHeight & width: _targetWidth. It adopts center-crop and zero-padding. You can pass whith _cropLeft and _cropTop top-left position of a crop to overide the default centered one.

Implementation

ResizeWithCropOrPadOp(this._targetHeight, this._targetWidth,
    [this._cropLeft, this._cropTop])
    : _output = Image(_targetWidth, _targetHeight);