NikNak Posted December 10, 2013 Share Posted December 10, 2013 Hi there I'm having troubles with transparent PNGs looking pretty bad when scaled in PW. The following image has a transparent background: Original image: 59k Resized image: Quality 90 32k Resized image: Quality 95 130k Resized image: Quality 10 28k There are black shadows appearing around the edge of any transparent area that isn't fully black. This results in an unusable image, currently. It is happening on all transparent logos I'm uploading. The code I use is here... $logoOptions = array( 'quality' => 100, 'upscaling' => 0, 'cropping' => 0 ); $logoOut = "<img src='{$page->logo->size(180, 180, $logoOptions)->url}' width='180' height='180' />"; The quality setting makes no difference to the corrupting of the transparent edges. I have tried PNGs output from Illustrator and Photoshop to make sure it wan't to do with the original, and I have tried two different installations on a local and remote server, both on PHP 5.4. Is this a limitation with GD in PHP? Does anyone have any suggestions [other than convert your images to jpg ] ? Kind regards Nik Link to comment Share on other sites More sharing options...
Martijn Geerts Posted December 10, 2013 Share Posted December 10, 2013 This could be related 1 Link to comment Share on other sites More sharing options...
NikNak Posted December 10, 2013 Author Share Posted December 10, 2013 Thanks v much Martijn for the reply - Raymond Geerts clearly had the exact same issue That helps a lot - I'll look into Horst's workaround to see if it helps. There is a BUG in GD-Lib with Alpha-Transparency in PNG. Fingers crossed I'll get it sorted. Kind regards Nik Link to comment Share on other sites More sharing options...
NikNak Posted December 10, 2013 Author Share Posted December 10, 2013 Yep - 'sharpening' => 'none' on the image sizer options cures the issue. Thanks again Martijn. Wish I'd found that post sooner! 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now