I looked around for a while and found some very confusing and complicated stuff that I couldn't get to work.
I'm using chronoforms with joomla to make a form with an upload file script, and it uploads the image to the server with no problems, so far so good.
I need to take the uploaded image and resize it, better yet, is there a way to resize the image before uploading it to the server?
Thanks.
I use this easy 1 function that does it all
check it out :
http://www.nimrodstech.com/php-image-resize/
https://github.com/Nimrod007/PHP_image_resize
I have used PHPThumb for a few of my projects and found it easy to work with and has a small resource footprint. You can read the docs for more info, but is pretty easy:
$thumb = PhpThumbFactory::create('/path/to/source/image.png');
$thumb->resize(100, 100);
$thumb->save('/path/where/you/want/resized/image.png');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With