sharpen image quality with PHP gd library

霸气de小男生 提交于 2019-12-21 05:11:10

问题


not sure where but I came across as image hosting site that allows you to upload your image in a large format or to sharpen it.

I personally do not recall or know of any functions of GD library to sharpen image which might just be a different word for quality being up-ed.

If some one knows of a function to sharpen images please tell me since personally I am not aware of such functions neither in Image Magic and/or GD Library.

  • Thanks in advance

回答1:


You'd use imageconvolution() with a matrix that corresponds to a sharpen filter. Details in this comment on the PHP site: http://php.net/manual/en/ref.image.php#56144




回答2:


You can use imageconvolution in GD with a sharpen mask. A good example is at http://adamhopkinson.co.uk/blog/2010/08/26/sharpen-an-image-using-php-and-gd/




回答3:


I haven't tried it, but this looks like what you're looking for, as far as ImageMagick goes.




回答4:


In GD library of php having a file with path

lib/PHPImageWorkshop/Core/ImageWorkshopLayer.php

Please go to save public function and you can change the imageQuality upto 100. make sure which type of image you want to create. Hope this will help you.



来源:https://stackoverflow.com/questions/6141713/sharpen-image-quality-with-php-gd-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!