Jump to content

Quality loss on PNG resize


Recommended Posts

Hi there,

I've been resizing some .png and got some pretty visible loss of quality. I attached those for comparison - around the Titanic (I know, they're big).

I tried to find similar threads but couldn't find anything that helped - at least it made me install Horsts IMagick Image Sizer.  

          foreach($detailrp->detail_repeater_bild as $pRetinaBild) {
            if ($pRetinaBild->width > $pRetinaBild->height) { // 3320px wide
              $pHighBild = $pRetinaBild->size(1660, 0);
              $pLowBild = $pRetinaBild->size(830, 0);
            else { // 3220px high
              $pHighBild = $pRetinaBild->size(0, 1610);
              $pLowBild = $pRetinaBild->size(0, 805);

Anyone has any idea what causes this and how to solve it? Or should I just go with .jpg? Thx!



Link to comment
Share on other sites

  • 1 month later...

Hey there,

 So you've been resizing some .png and got some pretty visible loss of quality? And now you want to solve this problem by installing Horsts IMagick Image Sizer? I think that such extensions can help you. Reviews are quite positive. I personally have Mac and edit photos via Movavi Photo Editor for Mac. I've never faced any problems with quality loss. It also helps to fix a low-quality areas. 

Link to comment
Share on other sites

Just to clarify: the png format has no quality loss. But the GD lib has massive issues in resizing dark image parts. 

With such dark images, you must set the imagesizer defaultGamma option to -1 !!

If your server supports imagick, you can activate the ImageSizerEngineIMagick, that is part of processwires core. (Under modules core).

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

,@neophron, I think this module and the service behind it has nothing to do with what was called "quality loss" in the above posts. It is a good method to compress your (final) png image variations to get smaller filesizes. But maybe nowadays you can use WebP format directly in PWs core, instead to stick with png output, and than having to invoke a remote service?


  • 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

  • Create New...