Using MD Image to resize and crop an Image
MD_Image is a CodeIgniter Library that allows you to resize and crop images in CodeIgniter keeping a desired ratio. You can see the original thread here.
![]()
With MD_Image you can create thumbnails for example to be used on profiles by setting the desired ratio, width, height and it will crop it for you. The image above shows an example using a portrait image as source and then it generated a landscape version keeping the ratio specified by parameter (4:3). In this case the library will adjust the width first, and then will crop the remaining content.
Here are two useful library functions that would be helpful to resize and crop images:
- crop_to_ratio($source, $width, $height, $x = 4, $y = 3, $dest = FALSE)
- resize_image($source, $width, $height, $dest = FALSE)
Related searches:
- codeigniter image resize and crop
- codeigniter image resize
- codeigniter resize and crop
- codeigniter image crop and resize
- codeigniter upload image and resize ajax
- resize imagen con jquery codeigniter
- codeigniter crop image
- cut image resize codeigniter
- crop image to 4:3 ever codeigniter
- how to upload profile picture with codeigniter




