Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Resize Image while Uploading using Zend_File_Transfer_Adapter_Http();

I am using Zend_File_Transfer_Adapter_Http for uploading Images. I need to set maximum size of uploading images to 300*300.Is there any solutions in Zend_File_Transfer_Adapter_Http class.Please help me.Already browse for solution; but nothing helps.

like image 373
Aadi Avatar asked Nov 01 '10 06:11

Aadi


2 Answers

It is making with help of Zend_Filter_ImageSize.

$filter = new Zend_Filter_ImageSize(); 
$output = $filter->setHeight(100) 
->setWidth(200) 
->filter('./orig.jpg'); 
like image 90
Alex Pliutau Avatar answered Oct 06 '22 22:10

Alex Pliutau


If you want to allow a bigger upload but resize, see http://phpthumb.gxdlabs.com/

like image 40
Ashley Avatar answered Oct 06 '22 23:10

Ashley