Welcome Guest, Not a member yet? Register   Sign In
Adding some missing image lib functions - custom MY_Image_lib.php
#1

[eluser]Unknown[/eluser]
Hey everyone, I am new here Smile

I came across the need to 'Resize and Pad' (with white background) and 'Resize and Crop' images on a website that has a need for fixed images. There is plenty of codes to resize and store images, but I found this: http://thinktank.goldfishdesign.co.nz/node/67

It extends the Image_lib.php nicely!

Just create a new MY_Image_lib.php and wrap it in:
class MY_Image_lib extends CI_Image_lib {}

NOTE:

I originally posted because I couldn't get the code to work, but it does, I just had $config['maintain_ratio'] = false; set to true.




Theme © iAndrew 2016 - Forum software by © MyBB