프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$compositeKeyTranslate | translate dictionary for composite modes. set in constructor if driver is imagick. | ||
$configModel | |||
$craftPositonTranslate | translate dictionary for translating crafts built in position constants into relative format (width/height offset) | ||
$ditherKeyTranslate | translate dictionary for dither method | ||
$filterKeyTranslate | translate dictionary for resize method | ||
$imageDriver | |||
$imageInstance | |||
$imagineInstance | |||
$interlaceKeyTranslate | translate dictionary for interlace method | ||
$invalidatePaths | |||
$taskCreated | |||
$transformKeyTranslate | translate dictionary for translating transform keys into filename markers |
메소드 | 설명 | |
---|---|---|
__construct ( ) | Constructor | |
deleteImageTransformCaches ( ) | Clear all image transforms caches | |
deleteRemoteImageCaches ( ) | Clear all remote image caches | |
executeOptimize ( $command, $file = '' ) | Executes a shell command | |
fixSlashes ( $str, boolean | false $removeInitial = false, boolean | false $removeTrailing = false ) : mixed | string | Fixes slashes in path | |
getCropSize ( Imagine\Image\Box $originalSize, $transform ) : Imagine\Image\Box | Creates the destination crop size box | |
getResizeSize ( Imagine\Image\Box $originalSize, $transform ) : Imagine\Image\Box | Creates the resize size box | |
getSetting ( $name, $transform = null ) : mixed | Gets a plugin setting | |
hasSupportForWebP ( ) : boolean | Checks for webp support in image driver | |
makeTask ( string $taskName, array $paths ) | Registers a Task with Craft, taking into account if there is already one pending | |
postOptimize ( $type, $file ) | Set up optimization | |
removeTransformsForAsset ( craft\AssetFileModel $asset ) | Remove transforms for a given asset | |
runJpegoptim ( $file ) | Run jpegoptim optimization | |
runJpegtran ( $file ) | Run jpegtran optimization | |
runMozjpeg ( $file ) | Run mozjpeg optimization | |
runOptipng ( $file ) | Run optipng optimization | |
runTinyPng ( $file ) | Runs TinyPNG optimization | |
transformImage ( craft\AssetFileModel | string $image, Array $transform, Array $transformDefaults, Array $configOverrides ) : craft\Image | Do an image transform |
메소드 | 설명 | |
---|---|---|
_applyBackgroundColor ( Imagine\Image\ImageInterface &$imageInstance, $bgColor ) | Apply background color to image when converting from transparent to non-transparent | |
_applyCustomFilter ( $imagick, $filterName ) | Applies a custom predefined filter to image | |
_applyImageEffects ( $imageInstance, $effects ) | Apply effects array to image instance | |
_applyLetterbox ( Imagine\Image\ImageInterface &$imageInstance, $transform ) | Apply letterbox to image | |
_applyWatermark ( $imageInstance, $watermark ) | Apply watermark to image | |
_colorBlend ( $imagickInstance, $color, integer $alpha = 1, integer $composite_flag = Imagick::COMPOSITE_COLORIZE ) | Color blend filter, more advanced version of colorize. | |
_createImagineInstance ( ) | Creates the Imagine instance depending on the image driver | |
_createTargetFilename ( string $filename, string $extension, $transform ) : string | Creates the target filename | |
_createTransformFilestring ( $transform ) : string | Creates additional file string that is appended to filename | |
_enforceMaxSize ( $width, $height, $originalSize, $maintainAspect, $zoomFactor = 1 ) : array | Enforces a max size if allowUpscale is false | |
_getCropPoint ( Imagine\Image\Box $resizeSize, Imagine\Image\Box $cropSize, $transform ) : Imagine\Image\Point | Gets crop point | |
_getCropZoomFactor ( $transform ) : float | integer | Get the crop zoom factor | |
_getFilterMethod ( $transform ) : string | Returns the filter method for resize operations | |
_getSaveOptions ( $extension, $transform ) : array | Get the save options based on extension and transform | |
_getTransformedImage ( |
Loads an image from a file system path, do transform, return transformed image as an Imager_ImageModel | |
_moveArrayKeyToPos ( $key, $pos, $arr ) : array | Moves a named key in an associative array to a given position | |
_normalizeTransform ( $transform, $paths = null ) : mixed | Normalize transform object and values | |
_saveAsWebp ( $imageInstance, $path, $sourceExtension, $saveOptions ) | Saves image as webp | |
_saveTemporaryFile ( $imageInstance, $sourceExtension ) : string | Save temporary file and return filename | |
_triggerTasksNow ( ) | Method that triggers any pending tasks immediately. | |
_vignette ( $imagickInstance, string $color1 = 'none', string $color2 = 'black', float $crop_factor = 1.5 ) | Create a vignette |
public deleteImageTransformCaches ( ) |
public executeOptimize ( $command, $file = '' ) | ||
$command |
public getCropSize ( Imagine\Image\Box $originalSize, $transform ) : Imagine\Image\Box | ||
$originalSize | Imagine\Image\Box | |
$transform | ||
리턴 | Imagine\Image\Box |
public getResizeSize ( Imagine\Image\Box $originalSize, $transform ) : Imagine\Image\Box | ||
$originalSize | Imagine\Image\Box | |
$transform | ||
리턴 | Imagine\Image\Box |
public getSetting ( $name, $transform = null ) : mixed | ||
$name | String Setting name | |
리턴 | mixed | Setting value |
public hasSupportForWebP ( ) : boolean | ||
리턴 | boolean |
public removeTransformsForAsset ( craft\AssetFileModel $asset ) | ||
$asset | craft\AssetFileModel |
public transformImage ( craft\AssetFileModel | string $image, Array $transform, Array $transformDefaults, Array $configOverrides ) : craft\Image | ||
$image | craft\AssetFileModel | string | |
$transform | Array | |
$transformDefaults | Array | |
$configOverrides | Array | |
리턴 | craft\Image |
public static $compositeKeyTranslate |
public static $craftPositonTranslate |
public static $ditherKeyTranslate |
public static $filterKeyTranslate |
public static $interlaceKeyTranslate |