michaellunsford Posted June 8, 2006 Share Posted June 8, 2006 Displaying an image as uploaded has a very nice saturation level, but if i just open it with imagecreate...() and have php redisplay it (no changes) it seems to lose quite a bit of saturation. I have created two examples to see if anyone knows what the issue might be, and any possible fix.using GD example[a href=\"http://www.virtual-showcase.net/proofs/gulfsouth/test.php\" target=\"_blank\"]http://www.virtual-showcase.net/proofs/gulfsouth/test.php[/a][code]$im=imagecreatefromstring(file_get_contents($file));header("Content-type: image/jpeg");imagepng($im);[/code]not using GD example[a href=\"http://www.virtual-showcase.net/proofs/gulfsouth/test2.php\" target=\"_blank\"]http://www.virtual-showcase.net/proofs/gulfsouth/test2.php[/a][code]header("Content-type: image/jpeg");echo file_get_contents($file);[/code]Thanks for any input! Quote Link to comment https://forums.phpfreaks.com/topic/11453-gd-image-quality-question/ Share on other sites More sharing options...
poirot Posted June 8, 2006 Share Posted June 8, 2006 JPEG images are compressed images. Their compression method/quality may differ depending on the program/version.The best you can do is increase the generated image's quality.[a href=\"http://www.php.net/imagejpeg\" target=\"_blank\"]http://www.php.net/imagejpeg[/a][code]imagejpeg ( resource image [, string filename [, int quality]] )[/code]PNG images however will have quality preserved. (at least here they're good). Quote Link to comment https://forums.phpfreaks.com/topic/11453-gd-image-quality-question/#findComment-43032 Share on other sites More sharing options...
michaellunsford Posted June 8, 2006 Author Share Posted June 8, 2006 I didn't think it mattered before, but since you bring it up, I'll mention it now. I tried upping the jpeg quality and even changed the output to png (using imagepng()), but get the same lower saturation results. It doesn't appear to be tied to jpeg.Still confused.thanks for any help! Quote Link to comment https://forums.phpfreaks.com/topic/11453-gd-image-quality-question/#findComment-43041 Share on other sites More sharing options...
michaellunsford Posted June 13, 2006 Author Share Posted June 13, 2006 I just discovered that windows users can't tell the two apart. Only Mac users can see the quality difference. Quote Link to comment https://forums.phpfreaks.com/topic/11453-gd-image-quality-question/#findComment-45101 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.