For Development, You need to select an image on the mobile phone page, and then cut the photo as the Avatar. How can you get some comments from various experts? Is there a demo? For Development, You need to select an image on the mobile phone page, and then cut the photo as the Avatar. How can you get some comments from various experts? Is there a demo?
Reply content:
For Development, You need to select an image on the mobile phone page, and then cut the photo as the Avatar. How can you get some comments from various experts? Is there a demo?
Https://github.com/baijunjie/jQuery-photoClip
Add canvas labels
Read the file using webapi and convert it to base encoding.
Draw an image to the canvas
Write a cut box. For example, a transparent absolute positioning transparency can be stretched p, covering the canvas.
Perform clip on the canvas and save the canvas as an image.
We recommend that you use the jsapi provided for image uploading. After obtaining the image, you can use canvas to process it. There are many cases on the Internet.
Baidu has a webuploader which does a good job.