I've got a php image upload/resize script working...its working fine for jpegs, gifs(both transparent and not) but pngs's just wont work....it all uploads fine...creates the thumbnail....but when you view it its 0bytes...the original file uploads fine...its just after trying to resize.
Theres no errors in the log file.
Heres the relevent parts of the script...all the variables used in the script are already set....the transparency function is for the gifs...dont know if its needed for the pngs too...i've tried with and without it applied but still no luck.
Expand|Select|Wrap|Line Numbers
- $tn = imagecreatetruecolor($modwidth, $modheight);
- $image = imagecreatefrompng($file);
- $this->setTransparency($tn,$image);
- imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height);
- imagepng($tn, $save, 100);