Class shardimage\shardimagephp\factories\Transformation

Inheritanceshardimage\shardimagephp\factories\Transformation

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__toString() Magic method for string casting. shardimage\shardimagephp\factories\Transformation
background() shardimage\shardimagephp\factories\Transformation
blur() shardimage\shardimagephp\factories\Transformation
border() Applies a border to the image. shardimage\shardimagephp\factories\Transformation
brightness() shardimage\shardimagephp\factories\Transformation
color() shardimage\shardimagephp\factories\Transformation
create() Creates a new transformation object. shardimage\shardimagephp\factories\Transformation
crop() Crops the image to the exact size specified by the resize methods. shardimage\shardimagephp\factories\Transformation
delay() Sets the video delay. shardimage\shardimagephp\factories\Transformation
density() Sets the density of pixels. shardimage\shardimagephp\factories\Transformation
eBackground() Sets the color for the background, when a layer extends outside the main image. shardimage\shardimagephp\factories\Transformation
end() Closes the layer definition. shardimage\shardimagephp\factories\Transformation
fill() Fits the image using gravity. shardimage\shardimagephp\factories\Transformation
fit() Fits the image into a box specified by the resize methods by adjusting the larger proportion. shardimage\shardimagephp\factories\Transformation
flag() Sets a general flag. shardimage\shardimagephp\factories\Transformation
flipHorizontal() Flips the image horizontally. shardimage\shardimagephp\factories\Transformation
flipHorizontalAndVertical() Flips the image horizontally and vertically. shardimage\shardimagephp\factories\Transformation
flipVertical() Flips the image vertically. shardimage\shardimagephp\factories\Transformation
flipVerticalAndHorizontal() Flips the image horizontally and vertically. shardimage\shardimagephp\factories\Transformation
gBottom() shardimage\shardimagephp\factories\Transformation
gBottomLeft() shardimage\shardimagephp\factories\Transformation
gBottomRight() shardimage\shardimagephp\factories\Transformation
gCenter() shardimage\shardimagephp\factories\Transformation
gEyes() shardimage\shardimagephp\factories\Transformation
gFace() shardimage\shardimagephp\factories\Transformation
gFaces() shardimage\shardimagephp\factories\Transformation
gLeft() shardimage\shardimagephp\factories\Transformation
gRight() shardimage\shardimagephp\factories\Transformation
gTop() shardimage\shardimagephp\factories\Transformation
gTopLeft() shardimage\shardimagephp\factories\Transformation
gTopRight() shardimage\shardimagephp\factories\Transformation
gXYCenter() shardimage\shardimagephp\factories\Transformation
grayscale() shardimage\shardimagephp\factories\Transformation
greyscale() shardimage\shardimagephp\factories\Transformation
group() Adds a new transformation group. shardimage\shardimagephp\factories\Transformation
height() Sets the target height. shardimage\shardimagephp\factories\Transformation
hue() shardimage\shardimagephp\factories\Transformation
ifElse() shardimage\shardimagephp\factories\Transformation
ifElseIf() shardimage\shardimagephp\factories\Transformation
ifEnd() shardimage\shardimagephp\factories\Transformation
ifIf() shardimage\shardimagephp\factories\Transformation
invert() shardimage\shardimagephp\factories\Transformation
jpegoptim() Turns on jpegoptim, which greatly reduces the size of jpeg images. shardimage\shardimagephp\factories\Transformation
lFill() Fits the image using gravity, but only if the original image is larger than the box. shardimage\shardimagephp\factories\Transformation
lFit() Fits the image into a box specified by the resize methods, but only if the original image is larger than the box. shardimage\shardimagephp\factories\Transformation
lPad() 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. shardimage\shardimagephp\factories\Transformation
negative() shardimage\shardimagephp\factories\Transformation
noOrientate() 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. shardimage\shardimagephp\factories\Transformation
nop() Empty operation. shardimage\shardimagephp\factories\Transformation
oilPaint() shardimage\shardimagephp\factories\Transformation
opacity() shardimage\shardimagephp\factories\Transformation
optipng() Turns on OptiPNG, which greatly reduces the size of png images. shardimage\shardimagephp\factories\Transformation
overlay() Places a layer over the current image. shardimage\shardimagephp\factories\Transformation
pad() 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. shardimage\shardimagephp\factories\Transformation
pixelate() shardimage\shardimagephp\factories\Transformation
quality() Sets the image quality. shardimage\shardimagephp\factories\Transformation
rotateCCW() Rotates the image counterclockwise by the specicifed degrees. shardimage\shardimagephp\factories\Transformation
rotateCW() Rotates the image clockwise by the specicifed degrees. shardimage\shardimagephp\factories\Transformation
round() Rounds the corners of the image. shardimage\shardimagephp\factories\Transformation
roundMax() Rounds the corners of the image with the maximum possible radius. shardimage\shardimagephp\factories\Transformation
scale() Scales the image, not maintaining aspect ratio. shardimage\shardimagephp\factories\Transformation
sepia() shardimage\shardimagephp\factories\Transformation
sharpen() shardimage\shardimagephp\factories\Transformation
shear() shardimage\shardimagephp\factories\Transformation
size() Resizes the image to the specified width and height. shardimage\shardimagephp\factories\Transformation
textOverlay() shardimage\shardimagephp\factories\Transformation
textUnderlay() shardimage\shardimagephp\factories\Transformation
threshold() shardimage\shardimagephp\factories\Transformation
tintBlue() shardimage\shardimagephp\factories\Transformation
tintGreen() shardimage\shardimagephp\factories\Transformation
tintRed() shardimage\shardimagephp\factories\Transformation
toBmp() Sets the format to bmp. shardimage\shardimagephp\factories\Transformation
toGif() Sets the format to gif. shardimage\shardimagephp\factories\Transformation
toJpeg() Sets the format to jpeg. shardimage\shardimagephp\factories\Transformation
toJpg() Sets the format to jpg. shardimage\shardimagephp\factories\Transformation
toPng() Sets the format to png. shardimage\shardimagephp\factories\Transformation
toPng24() Sets the format to png24. shardimage\shardimagephp\factories\Transformation
toPng32() Sets the format to png32. shardimage\shardimagephp\factories\Transformation
toPng48() Sets the format to png48. shardimage\shardimagephp\factories\Transformation
toPng64() Sets the format to png64. shardimage\shardimagephp\factories\Transformation
toPng8() Sets the format to png8. shardimage\shardimagephp\factories\Transformation
toTiff() Sets the format to tiff. shardimage\shardimagephp\factories\Transformation
toWebm() Sets the format to webm. shardimage\shardimagephp\factories\Transformation
toWebp() Sets the format to webp. shardimage\shardimagephp\factories\Transformation
trim() Trims the image by the specified fuzzy color threshold. shardimage\shardimagephp\factories\Transformation
underlay() Places a layer under the current image. shardimage\shardimagephp\factories\Transformation
width() Sets the target width. shardimage\shardimagephp\factories\Transformation
x() Sets the X offset to the specified value. shardimage\shardimagephp\factories\Transformation
y() Sets the Y offset to the specified value. shardimage\shardimagephp\factories\Transformation
zoom() Zooms the image by the specified percentage. shardimage\shardimagephp\factories\Transformation

Method Details

__toString() public method

Magic method for string casting.

public string __toString ( )
background() public method

public \self background ( $color )
$color \shardimage\shardimagephp\factories\type
blur() public method

public \self blur ( $amount )
$amount \shardimage\shardimagephp\factories\type
border() public method

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.

  • If 1 parameter is given, all borders have the same size.
  • If 2 parameters are given, the parameters are interpreted as vertical and horizontal borders.
  • If 3 parameters are given, the parameters are interpreted as top, vertical and bottom borders.
  • If 4 parameters are given, all borders have their respective sizes.
  • 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

    brightness() public method

    public \self brightness ( $amount )
    $amount
    color() public method

    public \self color ( $color )
    $color \shardimage\shardimagephp\factories\type
    create() public static method

    Creates a new transformation object.

    public static \self create ( )
    crop() public method

    Crops the image to the exact size specified by the resize methods.

    public \self crop ( )
    delay() public method

    Sets the video delay.

    public \self delay ( $time )
    $time integer

    Delay between the frames in ms

    density() public method

    Sets the density of pixels.

    public \self density ( $density )
    $density float

    Density in DPI

    eBackground() public method

    Sets the color for the background, when a layer extends outside the main image.

    public \self eBackground ( $color )
    $color \shardimage\shardimagephp\factories\type
    end() public method

    Closes the layer definition.

    public \self end ( )
    fill() public method

    Fits the image using gravity.

    public \self fill ( )
    fit() public method

    Fits the image into a box specified by the resize methods by adjusting the larger proportion.

    public \self fit ( )
    flag() public method

    Sets a general flag.

    public \self flag ( $flag )
    $flag string
    flipHorizontal() public method

    Flips the image horizontally.

    public \self flipHorizontal ( )
    flipHorizontalAndVertical() public method

    Flips the image horizontally and vertically.

    public \self flipHorizontalAndVertical ( )
    flipVertical() public method

    Flips the image vertically.

    public \self flipVertical ( )
    flipVerticalAndHorizontal() public method

    Flips the image horizontally and vertically.

    public \self flipVerticalAndHorizontal ( )
    gBottom() public method

    public \self gBottom ( )
    gBottomLeft() public method

    public \self gBottomLeft ( )
    gBottomRight() public method

    public \self gBottomRight ( )
    gCenter() public method

    public \self gCenter ( )
    gEyes() public method

    public \self gEyes ( )
    gFace() public method

    public \self gFace ( $id null )
    $id
    gFaces() public method

    public \self gFaces ( )
    gLeft() public method

    public \self gLeft ( )
    gRight() public method

    public \self gRight ( )
    gTop() public method

    public \self gTop ( )
    gTopLeft() public method

    public \self gTopLeft ( )
    gTopRight() public method

    public \self gTopRight ( )
    gXYCenter() public method

    public \self gXYCenter ( )
    grayscale() public method

    public \self grayscale ( )
    greyscale() public method

    public \self greyscale ( )
    group() public method

    Adds a new transformation group.

    Groups are executed in the given order, while items in groups are executed in optimized order.

    public \self group ( )
    height() public method

    Sets the target height.

    public \self height ( $height )
    $height integer

    Height

    hue() public method

    public \self hue ( $degrees )
    $degrees
    ifElse() public method

    public void ifElse ( )
    ifElseIf() public method

    public void ifElseIf ( $condition )
    $condition
    ifEnd() public method

    public void ifEnd ( )
    ifIf() public method

    public void ifIf ( $condition )
    $condition
    invert() public method

    public \self invert ( )
    jpegoptim() public method

    Turns on jpegoptim, which greatly reduces the size of jpeg images.

    public \self jpegoptim ( $quality null )
    $quality integer

    Maximum quality

    lFill() public method

    Fits the image using gravity, but only if the original image is larger than the box.

    public \self lFill ( )
    lFit() public method

    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 ( )
    lPad() public method

    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 ( )
    negative() public method

    public \self negative ( )
    noOrientate() public method

    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 ( )
    nop() public method

    Empty operation.

    public \self nop ( )
    oilPaint() public method

    public \self oilPaint ( $radius )
    $radius integer
    opacity() public method

    public \self opacity ( $amount )
    $amount \shardimage\shardimagephp\factories\type
    optipng() public method

    Turns on OptiPNG, which greatly reduces the size of png images.

    public \self optipng ( )
    overlay() public method

    Places a layer over the current image.

    public \self overlay ( $publicId )
    $publicId string
    pad() public method

    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 ( )
    pixelate() public method

    public \self pixelate ( $amount )
    $amount \shardimage\shardimagephp\factories\type
    quality() public method

    Sets the image quality.

    public \self quality ( $quality )
    $quality integer

    Quality in percent

    rotateCCW() public method

    Rotates the image counterclockwise by the specicifed degrees.

    public \self rotateCCW ( $degrees )
    $degrees float

    Degrees

    rotateCW() public method

    Rotates the image clockwise by the specicifed degrees.

    public self rotateCW ( $degrees )
    $degrees float

    Degrees

    round() public method

    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.

  • If 1 parameter is given, all corners are rounded with the same radius.
  • If 4 parameters are given, corners are rounded with their respective radiuses.
  • 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

    roundMax() public method

    Rounds the corners of the image with the maximum possible radius.

    public \self roundMax ( )
    scale() public method

    Scales the image, not maintaining aspect ratio.

    public \self scale ( )
    sepia() public method

    public \self sepia ( $amount )
    $amount \shardimage\shardimagephp\factories\type
    sharpen() public method

    public \self sharpen ( $amount )
    $amount \shardimage\shardimagephp\factories\type
    shear() public method

    public \self shear ( $x, $y null )
    $x integer
    $y integer
    size() public method

    Resizes the image to the specified width and height.

    public \self size ( $size )
    $size integer

    Width and height

    textOverlay() public method

    public \self textOverlay ( $text )
    $text string|shardimage\shardimagephp\factories\Text
    textUnderlay() public method

    public \self textUnderlay ( $text )
    $text string|shardimage\shardimagephp\factories\Text
    threshold() public method

    public \self threshold ( )
    tintBlue() public method

    public \self tintBlue ( $amount )
    $amount \shardimage\shardimagephp\factories\type
    tintGreen() public method

    public \self tintGreen ( $amount )
    $amount \shardimage\shardimagephp\factories\type
    tintRed() public method

    public \self tintRed ( $amount )
    $amount \shardimage\shardimagephp\factories\type
    toBmp() public method

    Sets the format to bmp.

    public \self toBmp ( )
    toGif() public method

    Sets the format to gif.

    public \self toGif ( )
    toJpeg() public method

    Sets the format to jpeg.

    public \self toJpeg ( )
    toJpg() public method

    Sets the format to jpg.

    public \self toJpg ( )
    toPng() public method

    Sets the format to png.

    public \self toPng ( )
    toPng24() public method

    Sets the format to png24.

    public \self toPng24 ( )
    toPng32() public method

    Sets the format to png32.

    public \self toPng32 ( )
    toPng48() public method

    Sets the format to png48.

    public \self toPng48 ( )
    toPng64() public method

    Sets the format to png64.

    public \self toPng64 ( )
    toPng8() public method

    Sets the format to png8.

    public \self toPng8 ( )
    toTiff() public method

    Sets the format to tiff.

    public \self toTiff ( )
    toWebm() public method

    Sets the format to webm.

    public \self toWebm ( )
    toWebp() public method

    Sets the format to webp.

    public \self toWebp ( $lossless true )
    $lossless boolean

    Lossless or lossy compression

    trim() public method

    Trims the image by the specified fuzzy color threshold.

    public \self trim ( $fuzzy 30 )
    $fuzzy integer

    Fuzzy color threshold

    underlay() public method

    Places a layer under the current image.

    public \self underlay ( $publicId )
    $publicId string
    width() public method

    Sets the target width.

    public \self width ( $width )
    $width integer

    Width

    x() public method

    Sets the X offset to the specified value.

    public \self x ( $offset )
    $offset integer

    X offset

    y() public method

    Sets the Y offset to the specified value.

    public \self y ( $offset )
    $offset integer

    Y offset

    zoom() public method

    Zooms the image by the specified percentage.

    public \self zoom ( $percent )
    $percent integer

    Zoom percentage