Class shardimage\shardimagephp\factories\Transformation
Inheritance | shardimage\shardimagephp\factories\Transformation |
---|
Public Methods
Method Details
Magic method for string casting.
public string __toString ( ) |
public \self background ( $color ) | ||
$color | \shardimage\shardimagephp\factories\type |
public \self blur ( $amount ) | ||
$amount | \shardimage\shardimagephp\factories\type |
Applies a border to the image.
Use color() to specify the color of the border.
Parameters behave like CSS border sizes, the number of given parameters modifies the function behaviour.
public \self border ( $top, $right = null, $bottom = null, $left = null ) | ||
$top | integer | All/vertical/top border size |
$right | integer | Horizontal/right border size |
$bottom | integer | Bottom border size |
$left | integer | Left border size |
public \self brightness ( $amount ) | ||
$amount |
public \self color ( $color ) | ||
$color | \shardimage\shardimagephp\factories\type |
Creates a new transformation object.
public static \self create ( ) |
Crops the image to the exact size specified by the resize methods.
public \self crop ( ) |
Sets the video delay.
public \self delay ( $time ) | ||
$time | integer | Delay between the frames in ms |
Sets the density of pixels.
public \self density ( $density ) | ||
$density | float | Density in DPI |
Sets the color for the background, when a layer extends outside the main image.
public \self eBackground ( $color ) | ||
$color | \shardimage\shardimagephp\factories\type |
Closes the layer definition.
public \self end ( ) |
Fits the image using gravity.
public \self fill ( ) |
Fits the image into a box specified by the resize methods by adjusting the larger proportion.
public \self fit ( ) |
Sets a general flag.
public \self flag ( $flag ) | ||
$flag | string |
Flips the image horizontally.
public \self flipHorizontal ( ) |
Flips the image horizontally and vertically.
public \self flipHorizontalAndVertical ( ) |
Flips the image vertically.
public \self flipVertical ( ) |
Flips the image horizontally and vertically.
public \self flipVerticalAndHorizontal ( ) |
public \self gBottom ( ) |
public \self gBottomLeft ( ) |
public \self gBottomRight ( ) |
public \self gCenter ( ) |
public \self gEyes ( ) |
public \self gFace ( $id = null ) | ||
$id |
public \self gFaces ( ) |
public \self gLeft ( ) |
public \self gRight ( ) |
public \self gTop ( ) |
public \self gTopLeft ( ) |
public \self gTopRight ( ) |
public \self gXYCenter ( ) |
public \self grayscale ( ) |
public \self greyscale ( ) |
Adds a new transformation group.
Groups are executed in the given order, while items in groups are executed in optimized order.
public \self group ( ) |
Sets the target height.
public \self height ( $height ) | ||
$height | integer | Height |
public \self hue ( $degrees ) | ||
$degrees |
public void ifElse ( ) |
public void ifElseIf ( $condition ) | ||
$condition |
public void ifEnd ( ) |
public void ifIf ( $condition ) | ||
$condition |
public \self invert ( ) |
Turns on jpegoptim, which greatly reduces the size of jpeg images.
public \self jpegoptim ( $quality = null ) | ||
$quality | integer | Maximum quality |
Fits the image using gravity, but only if the original image is larger than the box.
public \self lFill ( ) |
Fits the image into a box specified by the resize methods, but only if the original image is larger than the box.
public \self lFit ( ) |
Fits the image into a box specified by the resize methods, but only if the original image is larger than the box and adds padding with the background color, if the size of the fitted image is not exactly the same as the size of the box.
public \self lPad ( ) |
public \self negative ( ) |
Forces the engine not to use the orientate flag (e.g. in jpegs). Images are not going to be rotated automatically according to the exif data.
public \self noOrientate ( ) |
Empty operation.
public \self nop ( ) |
public \self oilPaint ( $radius ) | ||
$radius | integer |
public \self opacity ( $amount ) | ||
$amount | \shardimage\shardimagephp\factories\type |
Turns on OptiPNG, which greatly reduces the size of png images.
public \self optipng ( ) |
Places a layer over the current image.
public \self overlay ( $publicId ) | ||
$publicId | string |
Fits the image into a box specified by the resize methods and adds padding with the background color, if the size of the fitted image is not exactly the same as the size of the box.
public \self pad ( ) |
public \self pixelate ( $amount ) | ||
$amount | \shardimage\shardimagephp\factories\type |
Sets the image quality.
public \self quality ( $quality ) | ||
$quality | integer | Quality in percent |
Rotates the image counterclockwise by the specicifed degrees.
public \self rotateCCW ( $degrees ) | ||
$degrees | float | Degrees |
Rotates the image clockwise by the specicifed degrees.
public self rotateCW ( $degrees ) | ||
$degrees | float | Degrees |
Rounds the corners of the image.
Parameters behave like CSS border radiuses, the number of given parameters modifies the function behaviour. Either 1 or 4 parameters are required.
public \self round ( $topLeft, $topRight = null, $bottomRight = null, $bottomLeft = null ) | ||
$topLeft | \shardimage\shardimagephp\factories\type | General radius or radius on the top left corner |
$topRight | \shardimage\shardimagephp\factories\type | Radius on the top right corner |
$bottomRight | \shardimage\shardimagephp\factories\type | Radius on the bottom right corner |
$bottomLeft | \shardimage\shardimagephp\factories\type | Radius on the bottom left corner |
Rounds the corners of the image with the maximum possible radius.
public \self roundMax ( ) |
Scales the image, not maintaining aspect ratio.
public \self scale ( ) |
public \self sepia ( $amount ) | ||
$amount | \shardimage\shardimagephp\factories\type |
public \self sharpen ( $amount ) | ||
$amount | \shardimage\shardimagephp\factories\type |
public \self shear ( $x, $y = null ) | ||
$x | integer | |
$y | integer |
Resizes the image to the specified width and height.
public \self size ( $size ) | ||
$size | integer | Width and height |
public \self textOverlay ( $text ) | ||
$text | string|shardimage\shardimagephp\factories\Text |
public \self textUnderlay ( $text ) | ||
$text | string|shardimage\shardimagephp\factories\Text |
public \self threshold ( ) |
public \self tintBlue ( $amount ) | ||
$amount | \shardimage\shardimagephp\factories\type |
public \self tintGreen ( $amount ) | ||
$amount | \shardimage\shardimagephp\factories\type |
public \self tintRed ( $amount ) | ||
$amount | \shardimage\shardimagephp\factories\type |
Sets the format to bmp.
public \self toBmp ( ) |
Sets the format to gif.
public \self toGif ( ) |
Sets the format to jpeg.
public \self toJpeg ( ) |
Sets the format to jpg.
public \self toJpg ( ) |
Sets the format to png.
public \self toPng ( ) |
Sets the format to png24.
public \self toPng24 ( ) |
Sets the format to png32.
public \self toPng32 ( ) |
Sets the format to png48.
public \self toPng48 ( ) |
Sets the format to png64.
public \self toPng64 ( ) |
Sets the format to png8.
public \self toPng8 ( ) |
Sets the format to tiff.
public \self toTiff ( ) |
Sets the format to webm.
public \self toWebm ( ) |
Sets the format to webp.
public \self toWebp ( $lossless = true ) | ||
$lossless | boolean | Lossless or lossy compression |
Trims the image by the specified fuzzy color threshold.
public \self trim ( $fuzzy = 30 ) | ||
$fuzzy | integer | Fuzzy color threshold |
Places a layer under the current image.
public \self underlay ( $publicId ) | ||
$publicId | string |
Sets the target width.
public \self width ( $width ) | ||
$width | integer | Width |
Sets the X offset to the specified value.
public \self x ( $offset ) | ||
$offset | integer | X offset |
Sets the Y offset to the specified value.
public \self y ( $offset ) | ||
$offset | integer | Y offset |
Zooms the image by the specified percentage.
public \self zoom ( $percent ) | ||
$percent | integer | Zoom percentage |