Forum Moderators: coopster
I wonder what is wrong with my script. This seems to do just fine with the PNG and some GIF (ones it doesnt have to resize).
But if it has to resize gifs, they turn all black. And it will just give no error, but a red cross when it has to resize or even represent same size jpeg's.
How should I change it to make it usable with all the formats: gif, jpg, jpeg, png, bmp?
This is the part that is the trouble causer:
if($x_checked == false) {
$phase1 = imagecreate($new_x,$new_y);
imagecopyresized($phase1,$image,0,0,0,0,$new_x,$new_y,$rx,$ry);
} else {
$phase1 = imagecreate($new_x,$new_y);
imagecopyresized($phase1,$image,0,0,0,0,$new_x_2,$new_y_2,$new_x,$new_y);
}
imagecreatefromjpeg [uk2.php.net]
imagecreatefrompng [uk2.php.net]
imagecreatefromgif [uk2.php.net]
dc