javascript - Pick up an image already drawed in canvas -


संभव डुप्लिकेट:

मैंने एक फॉर्म बनाया था जो base64 में php स्क्रिप्ट के लिए एक तस्वीर भेज सकता है। मुझे फ़्लैश के साथ छवि पर कब्जा करना होगा और इसे कैनवास में डालना होगा (प्रपत्र पोस्ट करने से पहले पूर्वावलोकन के लिए उपयोगी) लेकिन मैं कैनवास में वास्तविक तस्वीर डेटा को एजेक्स के माध्यम से भेजने के लिए कैसे प्राप्त करूं?

(अंग्रेजी के लिए क्षमा करें!) :-) धन्यवाद

संपादित करें:

हल!

मैं सिर्फ कैनवास की ओर इशारा करता हूं

canvas = document.getElementById ('canvas');

pngBase64 = "पोस्ट-टेक्स्ट" आइटमप्रॉप = "टेक्स्ट">

  कैनवास = दस्तावेज़.getElementById ("कैनवास"); Context = canvas.getContext ("2d"); डेटा = context.getImageData (0,0, कैनवास.विंड, कैनवास। हाइट);   



Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -