nhn / tui.image-editor

🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.
http://ui.toast.com/tui-image-editor
MIT License
6.84k stars 1.26k forks source link

How can I save only the drawing as an overlay? #844

Closed liamslo closed 1 year ago

liamslo commented 1 year ago

Summary I would like to draw on an image, then remove the image so that I have an overlay against a transparent background. I have tried a few different methods to accomplish this, but have run into the following issues:

Is there any solution to this issue? To reiterate, I would like to draw on top of an image, remove that image, then download just the drawing. Kind of like tracing.

Thank you.

Version 3.15.2

liamslo commented 1 year ago

For anyone that is having the same issue/trying to do the same thing, this was my work-around:

getInstance().applyFilter('Brightness', {'brightness': 100}).then((res: any) => { getInstance().applyFilter('removeColor', { color: '#FFFFFF' }) console.log(res) })

That will remove the background image, while keeping the drawing in tact. I don't know how good of a workaround it is, but hopefully it helps someone in the same boat.