![]() |
Using a class that returns an image, how to display the image? - 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: Using a class that returns an image, how to display the image? (/showthread.php?tid=29260) |
Using a class that returns an image, how to display the image? - El Forum - 04-04-2010 [eluser]Jordz[/eluser] Hey Everyone, I'm new to code igniter literally just downloaded it and messing about with it. I know I'm diving head first into the deep end here but all I want to test out is the inclusion of external classes, like a photo manipulation class. For example currently I have a class that Equalises a photo and manipulates it, it does it's business here: Code: Class Equalise{ It returns the image then destroys it but after it's been loaded into the browser. I've been messing and added it into the application/libraries, as it said in the CI documentation, and in my Test controller added this code: Code: <?php This takes 3.jpg and runs it through the class. But I just does't seem to work I can't get an image to come out at all. Anyone have any idea's? Thanks, Jordan Using a class that returns an image, how to display the image? - El Forum - 04-04-2010 [eluser]Mischievous[/eluser] Hey Jordan, welcome to the community. The controllers just handles the request. You need to pass the info to a "View" file or echo the image out. Code: <?php Also, make sure your "outputimage" function is returning the image before its destroyed. |