开发者

Resizing before Uploading in PHP SWF Uploader Overlay DEMO

How to add the facility "resize image before upload" in SWF Overlay Demo.

http://demo.swfupload.org/v250beta3/resizedemo/index.php

http://demo.swfupload.org/v220/overlaydemo/index.php

开发者_运维问答

I want this resizing facility(1st link) in overlay demo(2nd). Could you please help?

is it possible to get "image resizing before upload" in the second link ?


They way I've done it is I let the user upload the image to a temporary location using this ajax flash uploader... http://valums.com/ajax-upload/

The flash uploads to a php script that creates 2 temporary version, the first one a resized version and the second the original. Then I return a json response with the path to the temporary files.

Then I load the resized version amd use this cropping http://deepliquid.com/content/Jcrop.html with a ratio constraint to get the portion of the picture to capture.

To complete the process the user submits the selected coordinates and the path to the temporary images to another scirpt which then takes the coordinates maps them to the original image and extract the portion of the image and resize it to the desired size using GD.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜