简体   繁体   English

使用JavaScript进行图像处理

[英]Image manipulation with javascript

I need the best way to manipulate with image in web browser with javascript. 我需要使用javascript在网络浏览器中处理图像的最佳方法。 How create script which will change brightness or contrast. 如何创建将改变亮度或对比度的脚本。 I google a little but i can find any acceptable solution. 我谷歌一点,但我可以找到任何可接受的解决方案。

Check CamanJS . 检查CamanJS
It is very flexible and powerful. 它非常灵活和强大。

If your audience have modern browsers you can use the <canvas> tag. 如果您的受众群体使用的是现代浏览器,则可以使用<canvas>标签。

Here is a tutorial: https://developer.mozilla.org/en/Canvas_tutorial 这是一个教程: https : //developer.mozilla.org/en/Canvas_tutorial

看看图书馆: http : //www.pixastic.com/

This is not possible with javascript. 使用javascript不可能。 You need to use GDLib or some other server side image manipulation library. 您需要使用GDLib或其他服务器端图像处理库。

I'd say your best option here is to use something like flash, java, etc. JavaScript MIGHT be able to do this, but it will never be able to do it WELL. 我想说,这里最好的选择是使用Flash,Java等。JavaScript可能能够做到这一点,但永远都做不到。 It is better to use a technology that has the power to do what you are asking without being stretched to it's limit. 最好使用能够胜任您所要求的技术而又不受其限制的技术。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM