Flash upload image resize client side

前端 未结 7 777
栀梦
栀梦 2020-12-01 04:37

Does anyone got an ideia on how to get client side image resize using flash.

Example: Client chooses an image with 1200x800 and before it uploads it flash will turn

相关标签:
7条回答
  • 2020-12-01 05:12

    Plupload is Opensource, has good documentation and supports multiple platforms, including Gears and HTML5!

    http://www.plupload.com/index.php
    http://www.plupload.com/example_all_runtimes.php

    Ah, yes, it supports resizing images BEFORE uploading. The closest option to aurigma, but for free :)

    0 讨论(0)
  • 2020-12-01 05:12

    I'm using flash uploader from http://www.resize-before-upload.com, works just fine :)

    0 讨论(0)
  • 2020-12-01 05:13

    You need create a transformation matrix, then draw the original bitmap into a new one using it. Here's the idea in something i am just typing in and have not tested:

    function resize(obm:BitmapData, scale:Number): BitmapData {
       var resizeMatrix:Matrix = new Matrix();
       resizeMatrix.scale(scale, scale);
    
       var rbm:BitmapData = new BitmapData(obm.width * scale, obm.height * scale);
       rbm.draw(obm, resizeMatrix);
    
       return rbm;
    }
    

    I make no claims about the quality of the result, however. I think I remember trying this in the past, not liking the result, and punting...

    0 讨论(0)
  • 2020-12-01 05:15

    http://www.shift8creative.com/projects/agile-uploader/index.html

    I just finished this little project - free to use. It won't really allow the end user to select the size, but you can pass a max width and max height constraint. Maybe you can make multiple pages/embeds with different options.

    0 讨论(0)
  • 2020-12-01 05:20

    take a look at the script i wrote : image resizing at client side

    0 讨论(0)
  • 2020-12-01 05:22

    The latest version of SwfUpload does client-side image resizing (using Flash). A pretty useful tool, although extras like displaying upload progress can get a little fiddly.

    http://code.google.com/p/swfupload/

    0 讨论(0)
提交回复
热议问题