Jump to content

Reduced image quality of images added to image fields


dazzyweb
 Share

Recommended Posts

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

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 by horst
  • Like 5
Link to comment
Share on other sites

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

Thanks Horst, your commit works great for 5.5 :D


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.

  • Like 1
Link to comment
Share on other sites

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:

post-1041-0-37573700-1397077308_thumb.jp

Edited by horst
  • Like 6
Link to comment
Share on other sites

  • 1 month later...

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

@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.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...