0

I am trying to get image which is in HTML canvas using python. Using jquery i captured image through webcam and stored it in canvas. Now i want to get those images to server side ie.python file.Is anyone have anyidea about it plz help me to do this. I tried to get image to server side using BeautifulSoup.But i need to get captured image which is in canvas. I have tried basic things to get image server side in python using BeautifulSoup.

Basic things:

page = BeautifulSoup(urllib2.urlopen("http://localhost:8086/wins/setimage"))
divTag = page.findAll("div", {"class":"im"})

anyone help me to get canvas image which is captured dynamically.

Community
  • 1
  • 1
Python Team
  • 1,143
  • 4
  • 21
  • 50
  • can you make it as simple.. i just take photo using jquery with the help of webcam. it will be stored as in canvas i think.. i get those images into server code. – Python Team Jul 18 '14 at 13:13

1 Answers1

0

How to get and manipulate webcam image server side in Plone is done in collective.takeaportrait.

The code that send JavaScript to the server is here: https://github.com/keul/collective.takeaportrait/blob/43cef9b8ec3faf7a1285a73fb312f95efedea53d/collective/takeaportrait/browser/resources/take-portrait.js#L54

The data you get server side is base64 encode, so you must process it like here: https://github.com/keul/collective.takeaportrait/blob/c5eff7d29b616a80997963c7bec6da1b5f334764/collective/takeaportrait/browser/view.py#L43

keul
  • 7,673
  • 20
  • 45