本文整理汇总了PHP中Intervention\Image\Image::orientate方法的典型用法代码示例。如果您正苦于以下问题:PHP Image::orientate方法的具体用法?PHP Image::orientate怎么用?PHP Image::orientate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Intervention\Image\Image
的用法示例。
在下文中一共展示了Image::orientate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* Perform orientation image manipulation.
* @param Image $image The source image.
* @return Image The manipulated image.
*/
public function run(Image $image)
{
$orientation = $this->getOrientation();
if ($orientation === 'auto') {
return $image->orientate();
}
return $image->rotate($orientation);
}
示例2: run
/**
* Perform orientation 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)
{
$orientation = $this->getOrientation($request->get('or'));
if ($orientation === 'auto') {
return $image->orientate();
}
return $image->rotate($orientation);
}
示例3: rotation
protected function rotation()
{
// Auto orientate
$this->image->orientate();
if ($this->flip) {
$this->image->flip($this->flip);
}
// Rotate within the existing frame
if ($this->rotation) {
$width = $this->image->getWidth();
$height = $this->image->getHeight();
$this->image->rotate($this->rotation);
$this->image->crop($width, $height);
}
// Rotate entire image
if ($this->orientation) {
$this->image->rotate($this->orientation);
}
}
示例4: handle
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public function handle($image, $options)
{
return $image->orientate();
}
示例5: applyFilter
public function applyFilter(Image $image)
{
return $image->orientate();
}