php GD图像调整为较小的新图像 - >模糊问题

Har*_*ldo 0 php

我正在缩小从200px宽到190px宽的图像,这个类

这是我得到的替代文字http://i40.tinypic.com/5as7eo.jpg

img 1 =原创 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - img 2 =更小

我尝试了几种不同的宽度但是我得到了与所有图像尺寸相同的锐度/模糊度损失.我的质量设置为100(最大)

Chr*_*mas 5

我发现这个解决方案,它为我工作,我有它在我的Facebook墙上(https://www.facebook.com/antimatterstudios/posts/10151207306454364)

一个可爱的小提示,我今天在网上找到(Facebook涂鸦墙上有直接链接)使用PHP的GD库来调整​​图像,并发现图像,那些人有调整和模糊的,你可以使用此代码小片段来锐化图像,它的好多了

 function imagesharpen( $image)
 {
    $matrix = array(
      array(-1, -1, -1),
      array(-1, 16, -1),
      array(-1, -1, -1),
    );

    $divisor = array_sum(array_map('array_sum', $matrix));
    $offset = 0; 
    imageconvolution($image, $matrix, $divisor, $offset);

    return $image;
}
Run Code Online (Sandbox Code Playgroud)

  • 这非常有效.我发现,16岁有点太尖锐了.18更合适. (2认同)