本文整理匯總了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();
}