Comments (4)
It shouldn't be a problem since the toDataURL() method of the canvas allows to get the encoded png or jpeg data.
This functionality is not yet present in the plugin, though. I'm wondering if it might not be out of its scope.
Maybe a method exposing the canvas or context used by the eraser would allow you to easily implement what you need.
What you think ?
from jquery.eraser.
Yes yes, toDataUrl() is good solution. Thank you very much.
I need to merge the top layer after erase, with the background. But I solved it quickly by your tip.
from jquery.eraser.
great !
is there any modification to do to the plugin to ease the process or is it good as it is ?
from jquery.eraser.
A good idea is to add two methods:
First select the top layer as PNG
function getpng(event){
var canvas = document.getElementById("kabelka"); // best $("#kabelka").get(0).toDataUrl();
var dataUrl = canvas.toDataURL();
$("textarea[name=image]").val(dataUrl);
$("form").submit();
event.preventDefault();
}
Second merges with the FG and BG chooses them as common picture (here is needed to canvas BG) - this is only idea
My simple test: http://test.matj.sk/eraser/
I creating Facebook app for handbag seller. I need dynamically change handbag from the left menu and user can erase area on hand. User also can with drag&drop change position of handbag. Result is shared to Facebook or Email as image.
Sorry for my bad english :)
from jquery.eraser.
Related Issues (20)
- eraser to 70%,progress stop HOT 2
- evaluatePoint计算完成度问题
- 100% width HOT 3
- it's not an issue it's a solution HOT 1
- zepto support HOT 1
- Unable to erase image on a bootstrap modal pop up
- Callback function HOT 2
- Complete not firing.
- use rem layout page,when I change telphone orientation, eraser comes not work!
- Hidden Div cannot work
- progress changes everytime I finish brush whole img HOT 2
- How to replace the cursor?
- Eraser not working instantaneously on desktop browser (chrome or safari), have to resize browser window to make it work?
- Can I only use pictures?
- android default browser erase issue HOT 1
- How can i check how much area of iamge is erased ? HOT 2
- use requestAnimationFrame for canvas updates HOT 1
- not work on android phone?
- Coordinates are lost inside a div with scroll bar. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery.eraser.