first here is the error.
not working
any other images i point it at work. i can't figure this out ofr the life of me, while i could possibly forgo using this with png's with transparency, i would like for it to work with everything.
$image = imagecreatefrompng($imagename);
$x=imagesx($image);
$y=imagesy($image);
$width=110;
$height=110;//($y*$width)/$x;
$imageOut=imagecreatetruecolor($width,$height);
//random point generation
$dsquare=$y<$x?$y:$x;
$dsquare=$dsquare<300?$dsquare:300;
$randx=rand(0,$x-$dsquare);
$randy=rand(0,$y-$dsquare);
//imagecopymerge($imageOut,$image,0,0,$randx,$randy,$width,$height,200);
imagecopyresampled($imageOut,$image,0,0,$randx,$randy,$width,$height,$dsquare,$dsquare);
imagepng($imageOut);