ImageManipulate Class description

Click to image for reload

ImageManipulate is a PHP class to manipulate images

wall examples

Example 1: all random values (800X600)

Create wall with random file from media dir

Example 2: fixed size one row (800X100)

Create stripe with random file from media dir

"r" is number of Rows

"c" is number of Columns - "c" is ignored if use rows

Example 3: fixed size one Column (800X100)

Create vertical stripe with random file from media dir

"r" is number of Rows

"c" is number of Columns - "c" is ignored if use rows


Asciize examples

Create Ascii image with random file from media dir

Example 1: without crop

Example 2: with crop


Mantain aspect ratio with max size examples

Create resized image mantaining aspect ratio of image with random file from media dir


Crop to fit explicit width and height examples

Create resized and cropped image to fit explicit Width and height of image with random file from media dir

Filter examples

IMG_FILTER_NEGATE: Reverses all colors of the image.

IMG_FILTER_GRAYSCALE: Converts the image into grayscale.

IMG_FILTER_BRIGHTNESS: Changes the brightness of the image. Use arg1 to set the level of brightness. The range for the brightness is -255 to 255.

IMG_FILTER_CONTRAST: Changes the contrast of the image. Use arg1 to set the level of contrast.

IMG_FILTER_COLORIZE: Like

IMG_FILTER_GRAYSCALE, except you can specify the color. Use arg1, arg2 and arg3 in the form of red, green, blue and arg4 for the alpha channel. The range for each color is 0 to 255.

IMG_FILTER_EDGEDETECT: Uses edge detection to highlight the edges in the image.

IMG_FILTER_EMBOSS: Embosses the image.

IMG_FILTER_GAUSSIAN_BLUR: Blurs the image using the Gaussian method.

IMG_FILTER_SELECTIVE_BLUR: Blurs the image.

IMG_FILTER_MEAN_REMOVAL: Uses mean removal to achieve a "sketchy" effect.

IMG_FILTER_SMOOTH: Makes the image smoother. Use arg1 to set the level of smoothness.

IMG_FILTER_PIXELATE: Applies pixelation effect to the image, use arg1 to set the block size and arg2 to set the pixelation effect mode.