PHP 클래스 Webiny\Component\Image\ImageLoader

You can load images using these methods: - open => opens an image from disk by providing an instance of \Webiny\Component\Storage\File\File - load => creates an image from given binary string - create => creates a blank image - resource => create an image from the given resource, e.g. from upload stream
상속: use trait Webiny\Component\StdLib\StdLibTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

공개 메소드들

메소드 설명
create ( integer $width, integer $height, string $bgColor = null ) : Webiny\Component\Image\ImageInterface Create a blank image with of given dimensions and fill it with $bgColor.
load ( string $string ) : mixed Create a new ImageInterface instance form the given binary string.
open ( File $image ) : Webiny\Component\Image\ImageInterface Creates a new ImageInterface instance from the given image at the provided path.
resource ( mixed $resource ) : Webiny\Component\Image\ImageInterface Create a new ImageInterface instance from the given resource.

비공개 메소드들

메소드 설명
fixImageOrientation ( File $imageFile, Webiny\Component\Image\ImageInterface $image ) Android and Iphone images are sometimes rotated "incorrectly".
getLoader ( ) : null | Webiny\Component\Image\Bridge\ImageLoaderInterface Returns an instance of ImageLoaderInterface.

메소드 상세

create() 공개 정적인 메소드

Create a blank image with of given dimensions and fill it with $bgColor.
public static create ( integer $width, integer $height, string $bgColor = null ) : Webiny\Component\Image\ImageInterface
$width integer Width of the new image.
$height integer Height of the new image.
$bgColor string Background color. Following formats are acceptable - "fff" - "ffffff" - array(255,255,255)
리턴 Webiny\Component\Image\ImageInterface

load() 공개 정적인 메소드

Create a new ImageInterface instance form the given binary string.
public static load ( string $string ) : mixed
$string string Binary string that holds image information.
리턴 mixed

open() 공개 정적인 메소드

Creates a new ImageInterface instance from the given image at the provided path.
public static open ( File $image ) : Webiny\Component\Image\ImageInterface
$image Webiny\Component\Storage\File\File Path to an image on the disk.
리턴 Webiny\Component\Image\ImageInterface

resource() 공개 정적인 메소드

Create a new ImageInterface instance from the given resource.
public static resource ( mixed $resource ) : Webiny\Component\Image\ImageInterface
$resource mixed Resource.
리턴 Webiny\Component\Image\ImageInterface