@bokehFeb 16.2006 — #[code=php]fswitch($type) { case 1: $src_im = imagecreatefromgif($src_path); break; case 2: $src_im = imagecreatefromjpeg($src_path); break; case 3: $src_im = imagecreatefrompng($src_path); break; case 15: $src_im = imagecreatefromwbmp($src_path); break; case 16: $src_im = imagecreatefromxbm($src_path); break; default: $src_im = false; }[/code][/QUOTE]That is not necessary. You could use the following instead:[code=php]$src_im = @imagecreatefromstring(@file_get_contents($src_path)) or die('Not an image');[/code]