PHP 클래스 Bkwld\Croppa\Image

파일 보기 프로젝트 열기: bkwld/croppa 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $data, array $options = [] ) Constructor
applyFilters ( $options ) Apply filters that have been defined in the config as seperate classes.
autoRotate ( ) Auto rotate the image based on exif data (like from phones) https://github.com/nik-kor/PHPThumb/blob/master/src/thumb_plugins/jpg_rotate.inc.php
crop ( integer $width, integer $height ) Resize and crop
cropQuadrant ( integer $width, integer $height, array $options ) Do a quadrant adaptive resize. Supported quadrant values are: +---+---+---+ | | T | | +---+---+---+ | L | C | R | +---+---+---+ | | B | | +---+---+---+
get ( ) : string Get the image data
pad ( integer $width, integer $height, array $options ) Pad an image to desired dimensions. Moves the image into the center and fills the rest with given color.
process ( integer $width = null, integer $height = null, array $options = [] ) Take the input from the URL and apply transformations on the image
resize ( integer $width, integer $height ) Resize with no cropping
resizeAndOrCrop ( integer $width, integer $height, array $options ) Determine which resize and crop to apply
trim ( array $options ) Determine which trim to apply.
trimPerc ( array $coords ) Trim the source before applying the crop with offset percentages
trimPixels ( array $coords ) Trim the source before applying the crop with as offset pixels

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string $data, array $options = [] )
$data string Image data as a string
$options array PHPThumb options

applyFilters() 공개 메소드

Apply filters that have been defined in the config as seperate classes.
public applyFilters ( $options )

autoRotate() 공개 메소드

Auto rotate the image based on exif data (like from phones) https://github.com/nik-kor/PHPThumb/blob/master/src/thumb_plugins/jpg_rotate.inc.php
public autoRotate ( )

crop() 공개 메소드

Resize and crop
public crop ( integer $width, integer $height )
$width integer
$height integer

cropQuadrant() 공개 메소드

Do a quadrant adaptive resize. Supported quadrant values are: +---+---+---+ | | T | | +---+---+---+ | L | C | R | +---+---+---+ | | B | | +---+---+---+
public cropQuadrant ( integer $width, integer $height, array $options )
$width integer
$height integer
$options array

get() 공개 메소드

Get the image data
public get ( ) : string
리턴 string Image data

pad() 공개 메소드

Pad an image to desired dimensions. Moves the image into the center and fills the rest with given color.
public pad ( integer $width, integer $height, array $options )
$width integer
$height integer
$options array

process() 공개 메소드

Take the input from the URL and apply transformations on the image
public process ( integer $width = null, integer $height = null, array $options = [] )
$width integer
$height integer
$options array

resize() 공개 메소드

Resize with no cropping
public resize ( integer $width, integer $height )
$width integer
$height integer

resizeAndOrCrop() 공개 메소드

Determine which resize and crop to apply
public resizeAndOrCrop ( integer $width, integer $height, array $options )
$width integer
$height integer
$options array

trim() 공개 메소드

Determine which trim to apply.
public trim ( array $options )
$options array

trimPerc() 공개 메소드

Trim the source before applying the crop with offset percentages
public trimPerc ( array $coords )
$coords array Cropping instructions as percentages

trimPixels() 공개 메소드

Trim the source before applying the crop with as offset pixels
public trimPixels ( array $coords )
$coords array Cropping instructions as pixels