abstract public function getTransformName()Inherited
| wild |
abstract public function getTransformKey()Inherited
| wild |
public function canApplyTransform($file)
| \PhabricatorFile | $file |
| wild |
abstract public function applyTransform($file)Inherited
| \PhabricatorFile | $file |
| wild |
public function getDefaultTransform($file)Inherited
| \PhabricatorFile | $file |
| wild |
public function generateTransforms()Inherited
| wild |
public function getOrExecuteTransformExplicit($file)Inherited
Get an existing transformed file, or create a new transformed file if no transformed file already exists. If a new file is produced, it is connected to the original file in an explicit way, so, persisting a new 'PhabricatorTransformedFile' row.
| PhabricatorFile | $file | Original file. You must check yourself if the viewer has sufficient permissions to see this file. |
| PhabricatorFile | Transformed file |
public function executeTransform($file)Inherited
Create a new transformed file. This usually causes the creation of a new 'PhabricatorFile'.
| PhabricatorFile | $file | Original file |
| PhabricatorFile | Transformed file |
public function executeTransformExplicit($file)Inherited
Wrapper of executeTransform() that also persists the relationship between the original file and the transform, if it makes sense to do so.
| PhabricatorFile | $file | Original file |
| PhabricatorFile | Transformed file |
public static function getAllTransforms()Inherited
| wild |
public static function getTransformByKey($key)Inherited
| $key |
| wild |
public function getTransformedDimensions($file)
Get an estimate of the transformed dimensions of a file.
| PhabricatorFile | $file | File to transform. |
| list<int, int>|null | Width and height, if available. |
protected function willTransformFile($file)
| \PhabricatorFile | $file |
| wild |
protected function getFileProperties()
| wild |
protected function applyCropAndScale($dst_w, $dst_h, $src_x, $src_y, $src_w, $src_h, $use_w, $use_h, $scale_up)
| $dst_w | ||
| $dst_h | ||
| $src_x | ||
| $src_y | ||
| $src_w | ||
| $src_h | ||
| $use_w | ||
| $use_h | ||
| $scale_up |
| wild |
protected function applyImagemagick($argv)
| array | $argv |
| wild |
protected function newFileFromData($data)
Create a new PhabricatorFile from raw data.
| string | $data | Raw file data. |
| wild |
protected function newEmptyImage($w, $h)
Create a new image filled with transparent pixels.
| int | $w | Desired image width. |
| int | $h | Desired image height. |
| GdImage|resource | New GD image resource. |
protected function getImageDimensions()
Get the pixel dimensions of the image being transformed.
| list<int, int> | Width and height of the image. |
protected function getData()
Get the raw file data for the image being transformed.
| string | Raw file data. |
protected function getImage()
Get the GD image resource for the image being transformed.
| GdImage|resource | GD image resource. |
public function getMaxTransformDimensions()
Get maximum supported image dimensions in pixels for transforming
| array<int> | Maximum width and height |
private function shouldUseImagemagick()
| wild |