本文整理汇总了PHP中Intervention\Image\Image::sharpen方法的典型用法代码示例。如果您正苦于以下问题:PHP Image::sharpen方法的具体用法?PHP Image::sharpen怎么用?PHP Image::sharpen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Intervention\Image\Image
的用法示例。
在下文中一共展示了Image::sharpen方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* Perform sharpen image manipulation.
* @param Request $request The request object.
* @param Image $image The source image.
* @return Image The manipulated image.
*/
public function run(Request $request, Image $image)
{
$sharpen = $this->getSharpen($request->get('sharp'));
if ($sharpen) {
$image->sharpen($sharpen);
}
return $image;
}
示例2: run
/**
* Perform sharpen image manipulation.
* @param Image $image The source image.
* @return Image The manipulated image.
*/
public function run(Image $image)
{
$sharpen = $this->getSharpen();
if ($sharpen !== null) {
$image->sharpen($sharpen);
}
return $image;
}
示例3: adjustment
protected function adjustment()
{
if ($this->gamma) {
$this->image->gamma($this->gamma);
}
if ($this->contrast) {
$this->image->contrast($this->contrast);
}
if ($this->brightness) {
$this->image->brightness($this->brightness);
}
if ($this->sharpen) {
$this->image->sharpen($this->sharpen);
}
}
示例4: handle
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public function handle($image, $options)
{
$options = array_merge($this->defaults, $options);
return $image->sharpen($options['amount']);
}
示例5: process
public function process(Image $image)
{
if ($this->request->query->has('sharpen') && $this->request->query->get('sharpen') >= 0 && $this->request->query->get('sharpen') <= 100) {
$image->sharpen((int) $this->request->query->get('sharpen'));
}
}
示例6: sharpenImage
public function sharpenImage($amount = 10)
{
$this->image->sharpen($amount);
return $this;
}
示例7: applyFilter
public function applyFilter(Image $image)
{
return $image->sharpen($this->amount);
}