CodeIgniter Forums
Image_lib crop - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Image_lib crop (/showthread.php?tid=6030)



Image_lib crop - El Forum - 02-12-2008

[eluser]M'hand[/eluser]
Code:
// If the target width/height match the source then it's pointless to crop, right?
            // So if dynamic output isn't on, then we'll return true so the user thinks
            // the process succeeded. It'll be our little secret...

            if ($this->width >= $this->orig_width AND $this->height >= $this->orig_height AND $this->dynamic_output !== TRUE)
            {
                //return TRUE;
            }
I know that this piece of code was the subject of some topic in the past. But I don't understand this :
Quote:So if dynamic output isn't on, then we'll return true
Isn't it suppose to return true if dynamic output is on?
For example : if I want to crop a "source_file" in a "new_file" with the current code, my new_file will not exist.