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.
精彩评论