drewdaemon / drewdaemon/angular-image-annotator
ERROR DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
- Ngôn ngữ chính
- TypeScript
- Star
- 3
- Fork
- 16
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I used the following tag to load the image:
```
```
I used the following function in my component to save the return Url from `getAnnotatedImage()` function call:
```
save() {
let saved = this.annotator.getAnnotatedImage('image/png');
if (saved)
this.mySavedImage = saved;
}
```
but it failed with the following error:
```
ERROR DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
at AiaImageAnnotatorComponent.getAnnotatedImage (http://localhost:4200/vendor.js:71813:28)
at AppComponent.save (http://localhost:4200/main.js:168:36)
at AppComponent_Template_button_click_171_listener (http://localhost:4200/main.js:493:147)
at executeListenerWithErrorHandling (http://localhost:4200/vendor.js:26822:16)
at wrapListenerIn_markDirtyAndPreventDefault (http://localhost:4200/vendor.js:26864:22)
at HTMLButtonElement. (http://localhost:4200/vendor.js:60166:38)
at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:412:35)
at Object.onInvokeTask (http://localhost:4200/vendor.js:44161:33)
at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:411:40)
at Zone.runTask (http://localhost:4200/polyfills.js:180:51)
```
I tried to save when it has not been edited, it failed the same way. Is the save function implemented in this tool?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện AppComponent.save(), hàm gọi AiaImageAnnotatorComponent.getAnnotatedImage('image/png'), và kiểm tra đường dẫn xuất canvas liên kết với điểm vào đó. Xác định hành vi mong đợi đối với một hình ảnh chưa chỉnh sửa và liệu thư viện có xử lý lỗi được báo cáo hay không; công việc được xem là hoàn tất khi hành vi lưu mong đợi đã được xác lập và xác minh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100