code: function (file) {
                  var _this = this;
                  if (file) {
                      setTimeout(function () {
                          _this.processing.emit(true);
                      }, 5);
                      this.imageLoaded = false;
                      this.originalImage = file;
                      this.ngxOpenCv.cvState.subscribe(function (cvState) {
                          return __awaiter(_this, void 0, void 0, function () {
                              return __generator(this, function (_a) {
                                  switch (_a.label) {
                                      case 0:
                                          if (!cvState.ready)
                                              return [3 /*break*/, 2];
                                          // read file to image & canvas
                                          return [4 /*yield*/, this.loadFile(file)];
                                      case 1:
                                          // read file to image & canvas
                                          _a.sent();
                                          this.processing.emit(false);
                                          _a.label = 2;
                                      case 2: return [2 /*return*/];
                                  }
                              });
                          });
                      });
                  }
              }
docs: ****** // INPUTS // ****** // 
  set image for editing
  @param file - file from form input