Today I will explain how to crop the image using jquery and CodeIgniter framework.
For this, I used imageareaselect.js jquery plugin and imgareaselect-default.css files.If you are creating crop image functionality for profile pic updates and your application is getting high traffic , you need to take good Virtual Private Servers, Built for Open Source Developers, Fully managed, lightning-fast, starting at $15/mo with 1GB RAM!, a developer running a complex application that requires instant scalability, or a designer wanting to give your clients’ sites maximum performance, then VPS hosting is just what you need!
Now I will create a view to upload the image using frontend request,for this I created a view file named cropimage.php
When user send the file upload request to controller function crop image()
This request will call model function to upload a file using codeigniter default library upload.
Now create controller name as welcome.php
Now we will look up model functions to upload image file to uploads folder and saving file name to database.
Now create model name as ektreemodel.php
In the above code, I used a upload thumbnail () function to create crop image into uploads folder and save it to the database.
Here to create thumbnail I had taken selected image x-axis, y-axis, height and width of the selected image areas dimensions.
Thanks for reading this article.
To Download Crop Image Functionality Please add blow details
[sdm_download id=”73″ fancy=”0″][sdm_download_counter id=”73″]