<script type="text/javascript">html2canvas(document.getElementById('wireframe'), {onrendered: function(canvas) {var url = '{{=URL(f="update",args=request.args,vars=request.vars)}}';var data = canvas.toDataURL("image/png");$.ajax({url: url,type: "GET",data: {'data':data},datatype: 'json',success: function (html) {$('#results').html(html);}});return false;}});</script>
def update():
from io import BytesIO
from PIL import Image
import base64
image = request.vars.data[request.vars.data.find(",")+1:]
im = Image.open(BytesIO(base64.b64decode(image)))
return db.wireframe.insert(screenshot=image)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.