PHP 클래스 Devise\Media\Images\Images

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

공개 메소드들

메소드 설명
canMakeThumbnailFromFile ( File $file ) : boolean Lets us know if we can make a thumbnail from this file objet
copyImage ( string $fromImagePath, string $toImagePath ) : string Copies an image from one location to another location, also handles creating sub directories if they don't already exist for us
cropAndResizeImage ( string $imagePath, integer $width, integer $height, integer $cropWidth, integer $cropHeight, integer $cropX, integer $cropY ) : Imagick Crops the image path and then resizes, used by the JCrop tool when we upload images via the Devise Sidebar
cropImage ( string | Imagic\Imagick $imagePath, integer $cropWidth, integer $cropHeight, integer $cropX, integer $cropY ) : Imagick Crop this image path to crop dimensions, these dimensions are coming from the JCrop javascript tool being passed in to us
makeThumbnailImage ( $originalPath, string $newPath, string $mime = 'image' ) : Imagick Makes a thumbnail out of a file
resizeImage ( string | Imagic\Imagick $imagePath, integer $width, integer $height ) : Imagick Resize this image path to specified width and height
saveImage ( Imagick $image, $path ) : mixed Save the image to this path, also recursively creates the directories if they don't exist

메소드 상세

canMakeThumbnailFromFile() 공개 메소드

Lets us know if we can make a thumbnail from this file objet
public canMakeThumbnailFromFile ( File $file ) : boolean
$file File
리턴 boolean

copyImage() 공개 메소드

Copies an image from one location to another location, also handles creating sub directories if they don't already exist for us
public copyImage ( string $fromImagePath, string $toImagePath ) : string
$fromImagePath string
$toImagePath string
리턴 string

cropAndResizeImage() 공개 메소드

Crops the image path and then resizes, used by the JCrop tool when we upload images via the Devise Sidebar
public cropAndResizeImage ( string $imagePath, integer $width, integer $height, integer $cropWidth, integer $cropHeight, integer $cropX, integer $cropY ) : Imagick
$imagePath string
$width integer
$height integer
$cropWidth integer
$cropHeight integer
$cropX integer
$cropY integer
리턴 Imagick

cropImage() 공개 메소드

Crop this image path to crop dimensions, these dimensions are coming from the JCrop javascript tool being passed in to us
public cropImage ( string | Imagic\Imagick $imagePath, integer $cropWidth, integer $cropHeight, integer $cropX, integer $cropY ) : Imagick
$imagePath string | Imagic\Imagick
$cropWidth integer
$cropHeight integer
$cropX integer
$cropY integer
리턴 Imagick

makeThumbnailImage() 공개 메소드

Makes a thumbnail out of a file
public makeThumbnailImage ( $originalPath, string $newPath, string $mime = 'image' ) : Imagick
$originalPath
$newPath string
$mime string
리턴 Imagick

resizeImage() 공개 메소드

Resize this image path to specified width and height
public resizeImage ( string | Imagic\Imagick $imagePath, integer $width, integer $height ) : Imagick
$imagePath string | Imagic\Imagick
$width integer
$height integer
리턴 Imagick

saveImage() 공개 메소드

Save the image to this path, also recursively creates the directories if they don't exist
public saveImage ( Imagick $image, $path ) : mixed
$image Imagick
$path
리턴 mixed