![]() |
Resize to fix width or length - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Resize to fix width or length (/showthread.php?tid=69243) |
Resize to fix width or length - behnampmdg3 - 10-25-2017 Hi; Can you please help me with this script? These are my resize criteria. My main concern is number 3 1 - Width smaller that 1063, height smaller than 650. Don’t resize 2 - One dimension bigger (width over 1063 OR height over 650). Don’t resize. 3 - Both bigger (width over 1063 AND height over 650), resize to the smaller of the 2 PHP Code: private function uploadFile($inputFile="file", $allowed_type="gif|jpg|png", $resize_image = TRUE) Thanks RE: Resize to fix width or length - behnampmdg3 - 10-25-2017 Ended up doing this PHP Code: elseif($size[0] > 1063 && $size[1] > 650) |