English 中文(简体)
2. 作物和客户形象的改变
原标题:Crop and resize image on clientside

是否可能与客户选定的计算机图像合作,而不向服务器上载图像。

如果是的话,那么网络方案拟订语言可以做些什么?

最佳回答

只能通过<代码>Flash、Silverlight或根据目标浏览器而定的习惯<代码>Plugin/ActiveX进行。

问题回答

您可以使用超文本5Canvas,无需使用假肢。

传播形象,改变信道的规模,塑造形象。 也可以得出结果,作为数据。

<!DOCTYPE HTML>
<html>
  <head>
    <style>
      body { margin: 0px; padding: 0px; }
    </style>
  </head>
  <body>
    <canvas id="myCanvas" width="578" height="200"></canvas>
    <script>
      var canvas = document.getElementById( myCanvas );
      var context = canvas.getContext( 2d );
      var imageObj = new Image();

      imageObj.onload = function() {
        // draw cropped image
        var sourceX = 150;
        var sourceY = 0;
        var sourceWidth = 150;
        var sourceHeight = 150;
        var destWidth = sourceWidth;
        var destHeight = sourceHeight;
        var destX = canvas.width / 2 - destWidth / 2;
        var destY = canvas.height / 2 - destHeight / 2;

        context.drawImage(imageObj, sourceX, sourceY, sourceWidth, sourceHeight, destX, destY, destWidth, destHeight);
      };
      imageObj.src =  http://www.html5canvastutorials.com/demos/assets/darth-vader.jpg ;
    </script>
  </body>
</html>

所有信贷都用于:

http://www.html5canvastutorials.com/tutorials/html5-canvas-image-crop/

也可通过诸如 j、MooTools、Proto打字和书本等 j文图书馆这样做:

http://www.bitrepository.com/image-cropping-with-jquery-mootools-prototype-scriptaculous.html





相关问题
Resources for Image Recognition

I am looking for a recommendation for an introduction to image processing algorithms (face and shape recognition, etc.) and wondered if anyone had an good recommendations, either for books, ...

Good reference book for digital image processing? [closed]

I am learning digital image processing on my own and would like recomendations on good reference books. If you know of books to definately stay away from that would be useful as well. Thanks

Python Tesseract can t recognize this font

I have this image: I want to read it to a string using python, which I didn t think would be that hard. I came upon tesseract, and then a wrapper for python scripts using tesseract. So I started ...

What s the quickest way to parallelize code?

I have an image processing routine that I believe could be made very parallel very quickly. Each pixel needs to have roughly 2k operations done on it in a way that doesn t depend on the operations ...

Computing object statistics from the second central moments

I m currently working on writing a version of the MATLAB RegionProps function for GNU Octave. I have most of it implemented, but I m still struggling with the implementation of a few parts. I had ...

Viola-Jones face detection claims 180k features

I ve been implementing an adaptation of Viola-Jones face detection algorithm. The technique relies upon placing a subframe of 24x24 pixels within an image, and subsequently placing rectangular ...

热门标签