在PHP SWF Uploader Overlay DEMO上载之前调整大小

时间:2022-08-29 07:58:06

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

如何在SWF Overlay Demo中添加设施“在上传前调整图像大小”。

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

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

http://demo.swfupload.org/v220/overlaydemo/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?

我希望在叠加演示(第2个)中使用此调整大小设施(第1个链接)。能否请你帮忙?

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

是否有可能在第二个链接中获得“上传前图像大小调整”?

1 个解决方案

#1


0  

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/

我这样做的方法就是让用户使用这个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.

flash上​​传到创建2个临时版本的php脚本,第一个是调整大小的版本,第二个是原始版本。然后我返回一个json响应,其中包含临时文件的路径。

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.

然后我加载调整大小的版本amd使用这个裁剪http://deepliquid.com/content/Jcrop.html并使用比率约束来获取要捕获的图片部分。

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.

为了完成该过程,用户将所选择的坐标和临时图像的路径提交给另一个scirpt,然后获取坐标将它们映射到原始图像并提取图像的一部分并使用GD将其调整到所需的大小。

#1


0  

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/

我这样做的方法就是让用户使用这个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.

flash上​​传到创建2个临时版本的php脚本,第一个是调整大小的版本,第二个是原始版本。然后我返回一个json响应,其中包含临时文件的路径。

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.

然后我加载调整大小的版本amd使用这个裁剪http://deepliquid.com/content/Jcrop.html并使用比率约束来获取要捕获的图片部分。

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.

为了完成该过程,用户将所选择的坐标和临时图像的路径提交给另一个scirpt,然后获取坐标将它们映射到原始图像并提取图像的一部分并使用GD将其调整到所需的大小。