![]() |
Creating photo gallery, little help please :-) - 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: Creating photo gallery, little help please :-) (/showthread.php?tid=31705) |
Creating photo gallery, little help please :-) - El Forum - 06-29-2010 [eluser]Christophe28[/eluser] Hello, I want to create a photo gallery. I have normal size photos on the server and thumbs. I keep the width and height of the photo in the database (is this smart or better working with getimagesize()?) What I'm trying to define is the image width of the thumb in the browser. When $width > $height the width of the thumb (in browser) has to be 80px, but when $width < $height the width of the thumb (in browser) has to be 54px. But what to do when the uploaded photo is already smaller than 80px, and how to program this? I'm a beginning programmer and I'm a little stuck here. Can somebody help me please? I also think there has to be a standard way to program this ... What I have for now = Code: if($data->file_width > $data->file_height) { Thx for any help in the right direction! Christophe |