php imagecopyresized vs imagecopyresampled vs imagecopy pros/cons

后端 未结 1 1702
半阙折子戏
半阙折子戏 2021-02-01 12:45

These all seem to do the same thing. What are the pros/cons of each.

imagecopyresized() vs imagecopyresampled() vs imagecopy().

I\'m resizing a user submitted im

1条回答
  •  说谎
    说谎 (楼主)
    2021-02-01 13:07

    imagecopyresized will copy and scale and image. This uses a fairly primitive algorithm that tends to yield more pixelated results.

    imagecopyresampled will copy and scale and image, it uses a smoothing and pixel interpolating algorithm that will generally yield much better results then imagecopyresized at the cost of a little cpu usage.

    imagecopy will copy but will not scale the image.

    0 讨论(0)
提交回复
热议问题