I\'m using a simple thumbnailing script I wrote and it\'s pretty standard:
$imgbuffer = imagecreatetruecolor($thumbwidth, $thumbheight);
switch($type) {
case 1
PNG is a lossless format and will not yield good compression ratios for photos and other complex images that are typically compressed in JPEG files.
To make things worse, if you're converting JPEG files to PNG, the PNG will also have to reproduce pixel-for-pixel the compression artifacts caused by the JPEG lossy compression.
Use PNG only for computer graphics and other images that are highly compressible or when you absolutely cannot lose any data (or, as Kris correctly pointed, when you need an alpha channel).