Magento resize() image quality: dirty white background

前端 未结 7 1352
天命终不由人
天命终不由人 2020-12-29 13:38

I have a client who is seriously unhappy with the way their product thumbnails are rendering on Magento.

The dodgy appearance is noticeable on two accounts:

7条回答
  •  情歌与酒
    2020-12-29 14:15

    You can put your own Gd2.php file in local (app/code/local/Varien/Image/Adapter/Gd2.php) and hard-wire the quality to 100%.

    Quality is working for me so I have not done that.

    You can also put an image convolution in there to sharpen your images, in that way you get the blur of a resize compensated for with a sharpen, e.g. put the following just inside the end of the 'resize' function:

        $sharpenMatrix = array(array(-1,-1,-1),array(-1,24,-1),array(-1,-1,-1));
        $divisor = 16;
        $offset = 0;
        imageconvolution($newImage, $sharpenMatrix, $divisor, $offset);
    

提交回复
热议问题