I have done this before, but now somethign is seriously wrong. I made a script looking something like this (shortened a bit):

Code:
if ($width > 500){
    $less = $width - 500;
    $prosent = 1.0 - ($less / $width);
    $new_h = round($prosent * $height);

    $thumb = imagecreatetruecolor(500,$new_h);
    imagealphablending($thumb, false);
    $source = imagecreatefromjpeg("$cfg_fullsizepics_path/$entry");
    imagecopyresampled($thumb, $source, 0, 0, 0, 0, 500, $new_h, $width, $height);
    $filename="$cfg_fullsizepics_path/$entry" . "_thumb.jpg";
    @imagejpeg($thumb, $filename);
}
I tested the script on all pictures in a folder where I have pictures from my phone, Visuals camera, and Mendhaks camera. But for some reason it works on pictures from my phone, Mendhaks camera, but NOT pictures from Visuals Camera. Anyone any idea. I have highlighted the line where the scripts stops. It gomes to that line when it handles a picture from Visuals camera, and then just stops there.

Any ideas? Any fallbacks I can use?
Thanks
- ØØ -