filmov
tv
Resize Image in PHP | CodeIgniter

Показать описание
In this php video tutorial, you will be able to resize image in CodeIgniter.
Resize image and store it in new folder.
Image upload in CodeIgniter Link:
How to upload File/Image in CodeIgniter | Helper Example
Steps:
Create a form for file upload.
Create a folder for file upload in your project directory.
then create a function for form submit in your controller
then define all the configuration for image upload
then for image upload , we will be using codeigniter image upload library
use function do_upload of image library
if image uploaded then return the image name
else return the error message for not uploading image
then in your controller you can store the file name in your database.
Image Manipulation Class
the image_resize function to look for an image called file_name located in the source_image folder, then create a thumbnail that is 75 X 50 pixels using the GD2 image_library
Since the maintain_ratio option is enabled, the thumb will be as close to the target width and height as possible while preserving the original aspect ratio. The thumbnail will be called file_name and located at the same level as source_image.
#codeigniter #knowledgethrusters #php #image
Resize image and store it in new folder.
Image upload in CodeIgniter Link:
How to upload File/Image in CodeIgniter | Helper Example
Steps:
Create a form for file upload.
Create a folder for file upload in your project directory.
then create a function for form submit in your controller
then define all the configuration for image upload
then for image upload , we will be using codeigniter image upload library
use function do_upload of image library
if image uploaded then return the image name
else return the error message for not uploading image
then in your controller you can store the file name in your database.
Image Manipulation Class
the image_resize function to look for an image called file_name located in the source_image folder, then create a thumbnail that is 75 X 50 pixels using the GD2 image_library
Since the maintain_ratio option is enabled, the thumb will be as close to the target width and height as possible while preserving the original aspect ratio. The thumbnail will be called file_name and located at the same level as source_image.
#codeigniter #knowledgethrusters #php #image
Комментарии