Ok, i played around with it. Please notice that i know nothing about PHP, but i was able to track down the Problem:
If i change:
if ($width_factor > $height_factor)
{
$nw = round($w / $width_factor);
$nh = round($h / $width_factor);
}
to:
if ($width_factor > $height_factor)
{
$nw = 400 ;
$nh = round($h / $width_factor);
}
it works. 500,600,1000 -> Anything bigger 400 don?t.
I guess that for some reasons ImeageCreateTrueColor don?t like big numbers.. but i have no Ideas why.
The image i used was a Standart jpg with 1600*1200. Size played no role.
I would really apreciate your help on this topic, as i will definitly extend this genius hack !
What i want to add:
-Other extension (.jpeg,.jpe ...)
-File size
Does anybody know if GDlib can read EXIF Data ?
(Yes my English sucks

)