Javascript 使用 HTML 5 和 Canvas 构建图像编辑器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7497019/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 02:30:26  来源:igfitidea点击:

Building an Image Editor with HTML 5 and Canvas

javascriptjqueryjquery-uihtmlcanvas

提问by Marvzz

I wanted to build a product customizer similar to http://www.getuncommon.com. But instead of Flash, I will utilize HTML5 canvas and Javascript.

我想构建一个类似于http://www.getuncommon.com的产品定制器。但我将使用 HTML5 画布和 Javascript 来代替 Flash。

Is there a library which I can use to create and achieve similar editor/product customizer as Uncommon?

是否有一个库可用于创建和实现与 Uncommon 类似的编辑器/产品定制器?

I did look at jQuery UI but it is seem more focused on interface than creating my own editor.

我确实看过 jQuery UI,但它似乎更侧重于界面而不是创建我自己的编辑器。

采纳答案by Adam Stacey

I did something similar to this a while ago.

不久前我做了类似的事情。

I used JQuery and Raphael JS. Raphael uses VML in Internet Explorer and SVG and Canvas in other browsers making it a very good cross-browser compatible option.

我使用了 JQuery 和Raphael JS。Raphael 在 Internet Explorer 中使用 VML,在其他浏览器中使用 SVG 和 Canvas,使其成为一个非常好的跨浏览器兼容选项。

A good demo of a project using Raphael can be found here.

可以在此处找到使用 Raphael 的项目的良好演示。

I used a lot of code from this demo to develop my own tool.

我使用了这个演示中的大量代码来开发我自己的工具。

Hope that helps.

希望有帮助。

回答by kangax

Take a look at Fabric.js canvas library.

看看Fabric.js 画布库

We're using it in production for design editor on printio.ru

我们在printio.ru上的设计编辑器的生产中使用它

回答by Atashbahar

I used kineticjsto create an E-Card editor. It was a great experience using the library.

我使用kineticjs创建了一个电子贺卡编辑器。使用图书馆是一次很棒的体验。