I'm using a code that displays images from a directory and turns them into thumbnails. In the code: if ($image_format==1) { $old_image=imagecreatefromgif($filename); } elseif ($image_format==2) { $old_image=imagecreatefromjpeg($filename); } elseif ($image_format==3) { $old_image=imagecreatefrompng($filename); } else { exit; } Code (markup): the "imagecreatefrompng" isn't working, as only JPGs and GIF's show on the list. Any ideas on how to fix this?
do'h. I changed: if ($ext!='gif' && $ext!='jpg') continue; Code (markup): to: if ($ext!='gif' && $ext!='jpg' && $ext!='png') continue; Code (markup): and that did the trick.