Download the PHP package ride/lib-image without Composer
On this page you can find all versions of the php package ride/lib-image. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ride/lib-image
More information about ride/lib-image
Files in ride/lib-image
Package lib-image
Short Description Image processing library of the Ride framework
License MIT
Informations about the package lib-image
Ride: Image Library
Image processing library of the PHP Ride framework.
You need GD or Imagick on your server to use this library.
What's In This Library
Image
The Image interface is the base of this library.
Through this interface, you can:
- read and write images
- get information about your image like the dimension
- basic manipulations like resizing and cropping
The DrawImage interface extends from Image and adds methods to draw points, lines, ... on the image.
Implementations are available for GD and Imagick.
ImageFactory
The ImageFactory interface offers a generic way to create the instances needed to work with images.
A generic implementation is provided through GenericImageFactory.
Point
The Point interface is to define a coordinate on an X-Y axis. It's used for image manipulations. A point can go positive or negative on an axis.
A generic implementation is provided through GenericPoint.
Dimansion
The Dimension interface defines a dimension of an image or manipulation.
A generic implementation is provided through GenericDimension.
Transformation
The Transformation interface offers a way to apply batch image manipulations.
There are implementations available for crop, resize, flip, blur, grayscale, watermark and chain manipulations.
Blur
Blurs your image.
This transformation has following options:
- radius: optional and defaults to 10
Crop
Crops your image by resizing it first to an optimal dimension.
This transformation requires the following options:
- width: width to crop to in pixels
- height: height to crop to in pixels
Flip
Flips your image over the X-axis and/or the Y-axis.
This transformation requires the following options:
- mode: can be horizontal, vertical or both.
Grayscale
Converts your image to a grayscaled image.
This transformations has no options.
Resize
Resizes your image to fit a maximum width and/or height.
This transformation requires one of the following options:
- width: maximum width of the resulting image
- height: maximum height of the resulting image
Watermark
Adds a watermark to your image.
This transformation has the following options:
- x: Point on the X-axis, defaults to 0
- y: Point on the Y-axis, defaults to 0
- watermark: relative path to the watermark image
Optimizer
The Optimizer interface can be used to implement optimalizations on image files. It's intented to optimize the file sizes but can be used for other purposes as well.
A generic implementation is provided through GenericOptimizer.
GenericOptimizer
The generic image optimizer uses the following binaries on your system:
- pngcrush
- optipng
- jpegoptim
- jpegtran (libjpeg-turbo-progs or libjpeg-progs)
- gifsicle
Note: Unexistant binaries are ignored.
NullOptimizer
No optimization is performed by this optimizer.
Color
The Color interface offers an easy way to work with colors.
The interface is currently implemented for the RGB and the HSL color model.
ColorScheme
The ColorScheme interface is to generate a number of colors for a specified base color.
The interface is currently implemented for monochomatic and complementary schemes.
Code Sample
Check this code sample to see the possibilities of this library:
Implementations
For more examples, you can check the following implementation of this library:
Installation
You can use Composer to install this library.