dazzyweb Posted April 8, 2014 Share Posted April 8, 2014 I seem to have a strange problem with using image fields. The problem seems to be with processwire installed on xampp with windows. When I add images to an image field the field then loses image quality. The quality is also still reduced when included in a textarea. Also the poor image quality is still shown on the live page. If I click to view full size then the image is fine and clear. As a test I uploaded the same site with the poor images to my hosting and saw the images were still poor but when adding the same images again they were fine and showed clearly with no loss of quality. The issue seems to be my windows / xampp environment. I don't have any such issues with previous versions of processwire so this is just with the latest version. Does anyone have a clue what the issue can be? Link to comment Share on other sites More sharing options...
horst Posted April 9, 2014 Share Posted April 9, 2014 (edited) You use PHP 5.5.x ?? Look here and above: https://github.com/ryancramerdesign/ProcessWire/pull/436#issuecomment-39912911 EDIT: PHP 5.5.9 and 5.5.10 are with buggy GD-libs. Try to avoid them, switch to 5.5.11+. I have send a pull request for ImageSizer to the dev branch to skip sharpening (imageconvolution) when running on this php versions. Edited April 9, 2014 by horst 5 Link to comment Share on other sites More sharing options...
dazzyweb Posted April 9, 2014 Author Share Posted April 9, 2014 Maybe the problem is connected with the php version. Xampp has php version 5.5.9 and my hosting uses PHP Version 5.4.25 As a test I changed my hosting to use the latest version it has which is PHP Version 5.5.9 and the problem is there as well now. So it seems the problem is maybe with php version Link to comment Share on other sites More sharing options...
onjegolders Posted April 9, 2014 Share Posted April 9, 2014 Thanks Horst, your commit works great for 5.5 Maybe the problem is connected with the php version. Xampp has php version 5.5.9 and my hosting uses PHP Version 5.4.25 As a test I changed my hosting to use the latest version it has which is PHP Version 5.5.9 and the problem is there as well now. So it seems the problem is maybe with php version Dazzy, try Horst's commit and you can keep 5.5. 1 Link to comment Share on other sites More sharing options...
horst Posted April 9, 2014 Share Posted April 9, 2014 (edited) EDIT: This is obsolete, as of the fix is already in the dev branch 2.4.2, so better you fetch a new PW-Version from there ------------------------------------------------------------------------------------ Hi, I have added an UnSharpMask method to the attached ImageSizer.php that allow sharpening with the buggy PHP versions too. It is an implementation in pure PHP and doesn't use the buggy imageconvolution function from GD. But transparent png's even do not work nicely and get skipped from sharpening. And please, first test it before dropping into a production site. SO, if you want try it, here it is: Edited May 26, 2014 by horst 6 Link to comment Share on other sites More sharing options...
dazzyweb Posted April 9, 2014 Author Share Posted April 9, 2014 Thanks Horst, Just tried it and seems to work fine. Link to comment Share on other sites More sharing options...
Sanyaissues Posted May 26, 2014 Share Posted May 26, 2014 Thanks Horst! Works for me. Link to comment Share on other sites More sharing options...
dazzyweb Posted May 26, 2014 Author Share Posted May 26, 2014 I am building a site and this site needs a gallery which i have created and it seems that there is still quite a problem with images to me. I use the thumbnails to display smaller versions of images in the gallery. jpg image thumbnails are a problem. The fix improved the image quality but it is still quite poor compared to previous versions of processwire. I have tested in several versions of php and the problem is still there with thumbnails. I have compared previous versions of Processwire and the image quality for cropped thumbnails is hugely different from the current version and the dev version. I tested in processwire 2.3.1 and thumbnail images were perfect quality Testing in 2.4 with the fix and the latest dev version it appears that the image quality of the thumb nails is much reduced. This can really be seen when using apeisa thumbnails module and hovering over the thumbnail preview in the admin of an image especially with the darker parts of the images. A good way to see it is to upload an image to an image field with type CropImage and set thumbnail settings to thumbnail,400,400. It can be clearly seen then that the image quality is not that great. When comparing this to processwire 2.3.1 it has quite a loss of image quality. I have tested this is php versions 5.3.28 and 5.4.25 and 5.5.9 all with the same results Link to comment Share on other sites More sharing options...
horst Posted May 26, 2014 Share Posted May 26, 2014 @dazzyweb: you should not use this quick fix anymore but use the dev version of PW. Speaking about image issues is hard to understand, best would be if you could create 2 or 3 thumbs of same dimensions from the same image and name the files according to it's used pw version. Different PHP versions aren't necessary. Would just see / compare a 2.3.1 and a 2.4.2. You can PM me or upload them as zip here to that thread. 1 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