interface ImageInterface implements ManipulatorInterface
The image interface
Constants
RESOLUTION_PIXELSPERINCH |
|
RESOLUTION_PIXELSPERCENTIMETER |
|
INTERLACE_NONE |
|
INTERLACE_LINE |
|
INTERLACE_PLANE |
|
INTERLACE_PARTITION |
|
FILTER_UNDEFINED |
|
FILTER_POINT |
|
FILTER_BOX |
|
FILTER_TRIANGLE |
|
FILTER_HERMITE |
|
FILTER_HANNING |
|
FILTER_HAMMING |
|
FILTER_BLACKMAN |
|
FILTER_GAUSSIAN |
|
FILTER_QUADRATIC |
|
FILTER_CUBIC |
|
FILTER_CATROM |
|
FILTER_MITCHELL |
|
FILTER_LANCZOS |
|
FILTER_BESSEL |
|
FILTER_SINC |
|
Methods
ManipulatorInterface |
copy()
Copies current source image into a new ImageInterface instance |
from ManipulatorInterface |
ManipulatorInterface |
crop(PointInterface $start, BoxInterface $size)
Crops a specified box out of the source image (modifies the source image) Returns cropped self |
from ManipulatorInterface |
ManipulatorInterface |
resize(BoxInterface $size, string $filter = ImageInterface::FILTER_UNDEFINED)
Resizes current image and returns self |
from ManipulatorInterface |
ManipulatorInterface |
rotate(integer $angle, ColorInterface $background = null)
Rotates an image at the given angle. |
from ManipulatorInterface |
ManipulatorInterface |
paste(ImageInterface $image, PointInterface $start)
Pastes an image into a parent image Throws exceptions if image exceeds parent image borders or if paste operation fails |
from ManipulatorInterface |
ManipulatorInterface |
save(string $path = null, array $options = array())
Saves the image at a specified path, the target file extension is used to determine file format, only jpg, jpeg, gif, png, wbmp and xbm are supported |
from ManipulatorInterface |
ManipulatorInterface |
show(string $format, array $options = array())
Outputs the image content |
from ManipulatorInterface |
ManipulatorInterface |
flipHorizontally()
Flips current image using horizontal axis |
from ManipulatorInterface |
ManipulatorInterface |
flipVertically()
Flips current image using vertical axis |
from ManipulatorInterface |
ManipulatorInterface |
strip()
Remove all profiles and comments |
from ManipulatorInterface |
ManipulatorInterface |
thumbnail(BoxInterface $size, string $mode = self::THUMBNAIL_INSET, string $filter = ImageInterface::FILTER_UNDEFINED)
Generates a thumbnail from a current image Returns it as a new image, doesn't modify the current image |
from ManipulatorInterface |
ManipulatorInterface |
applyMask(ImageInterface $mask)
Applies a given mask to current image's alpha channel |
from ManipulatorInterface |
ManipulatorInterface |
fill(FillInterface $fill)
Fills image with provided filling, by replacing each pixel's color in the current image with corresponding color from FillInterface, and returns modified image |
from ManipulatorInterface |
string |
get(string $format, array $options = array())
Returns the image content as a binary string |
|
string |
__toString()
Returns the image content as a PNG binary string |
|
DrawerInterface |
draw()
Instantiates and returns a DrawerInterface instance for image drawing |
|
EffectsInterface |
effects()
|
|
BoxInterface |
getSize()
Returns current image size |
|
ImageInterface |
mask()
Transforms creates a grayscale mask from current image, returns a new image, while keeping the existing image unmodified |
|
array |
histogram()
Returns array of image colors as Imagine\Image\Palette\Color\ColorInterface instances |
|
ColorInterface |
getColorAt(PointInterface $point)
Returns color at specified positions of current image |
|
LayersInterface |
layers()
Returns the image layers when applicable. |
|
ImageInterface |
interlace(string $scheme)
Enables or disables interlacing |
|
PaletteInterface |
palette()
Return the current color palette |
|
ImageInterface |
usePalette(PaletteInterface $palette)
Set a palette for the image. |
|
ImageInterface |
profile(ProfileInterface $profile)
Applies a color profile on the Image |
|
MetadataBag |
metadata()
Returns the Image's meta data |
Details
in ManipulatorInterface at line 35
public ManipulatorInterface
copy()
Copies current source image into a new ImageInterface instance
in ManipulatorInterface at line 49
public ManipulatorInterface
crop(PointInterface $start, BoxInterface $size)
Crops a specified box out of the source image (modifies the source image) Returns cropped self
in ManipulatorInterface at line 61
public ManipulatorInterface
resize(BoxInterface $size, string $filter = ImageInterface::FILTER_UNDEFINED)
Resizes current image and returns self
in ManipulatorInterface at line 75
public ManipulatorInterface
rotate(integer $angle, ColorInterface $background = null)
Rotates an image at the given angle.
Optional $background can be used to specify the fill color of the empty area of rotated image.
in ManipulatorInterface at line 93
public ManipulatorInterface
paste(ImageInterface $image, PointInterface $start)
Pastes an image into a parent image Throws exceptions if image exceeds parent image borders or if paste operation fails
Returns source image
in ManipulatorInterface at line 107
public ManipulatorInterface
save(string $path = null, array $options = array())
Saves the image at a specified path, the target file extension is used to determine file format, only jpg, jpeg, gif, png, wbmp and xbm are supported
in ManipulatorInterface at line 119
public ManipulatorInterface
show(string $format, array $options = array())
Outputs the image content
in ManipulatorInterface at line 128
public ManipulatorInterface
flipHorizontally()
Flips current image using horizontal axis
in ManipulatorInterface at line 137
public ManipulatorInterface
flipVertically()
Flips current image using vertical axis
in ManipulatorInterface at line 146
public ManipulatorInterface
strip()
Remove all profiles and comments
in ManipulatorInterface at line 160
public ManipulatorInterface
thumbnail(BoxInterface $size, string $mode = self::THUMBNAIL_INSET, string $filter = ImageInterface::FILTER_UNDEFINED)
Generates a thumbnail from a current image Returns it as a new image, doesn't modify the current image
in ManipulatorInterface at line 169
public ManipulatorInterface
applyMask(ImageInterface $mask)
Applies a given mask to current image's alpha channel
in ManipulatorInterface at line 180
public ManipulatorInterface
fill(FillInterface $fill)
Fills image with provided filling, by replacing each pixel's color in the current image with corresponding color from FillInterface, and returns modified image
at line 61
public string
get(string $format, array $options = array())
Returns the image content as a binary string
at line 70
public string
__toString()
Returns the image content as a PNG binary string
at line 77
public DrawerInterface
draw()
Instantiates and returns a DrawerInterface instance for image drawing
at line 82
public EffectsInterface
effects()
at line 89
public BoxInterface
getSize()
Returns current image size
at line 97
public ImageInterface
mask()
Transforms creates a grayscale mask from current image, returns a new image, while keeping the existing image unmodified
at line 104
public array
histogram()
Returns array of image colors as Imagine\Image\Palette\Color\ColorInterface instances
at line 115
public ColorInterface
getColorAt(PointInterface $point)
Returns color at specified positions of current image
at line 125
public LayersInterface
layers()
Returns the image layers when applicable.
at line 136
public ImageInterface
interlace(string $scheme)
Enables or disables interlacing
at line 143
public PaletteInterface
palette()
Return the current color palette
at line 154
public ImageInterface
usePalette(PaletteInterface $palette)
Set a palette for the image.
Useful to change colorspace.
at line 165
public ImageInterface
profile(ProfileInterface $profile)
Applies a color profile on the Image
at line 172
public MetadataBag
metadata()
Returns the Image's meta data