What I really would like to get working is imagejpeg. That would solve my entire image quality issue altogether.
Here's my function:
if (!file_exists($output)) {
$new= imagecreatetruecolor($new_width, $new_height);
imagecopyresampled($new, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagejpeg($new, $filename, 92);
$save($new, $output);
imagedestroy($new);
}
imagedestroy($img);
imagejpeg is working, but it requires me to reload the browser at least twice for it to work (in Firefox) The first time it'll show the default jpeg quality, and then upon reload it'll show the higher quality 92 version.
In Safari, it's even worse. It'll show an X the first time you load it, and then when you refresh it'll show the default image and not the high quality 92 version. You have to reload it several times to finally see the 92 version. Very odd, and it's not a cache issue. I've checked and checked.
So I'm doing something wrong, but it seems so close to working that I wouldn't even need USM at all.
