Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

Phalcon Image

This component allows developers to manipulate image files. We can perform multiple operation on a single image file.

Adapters

Adapter are used to encapsulate specific image manipulator programs. The following image manipulator programs are supported:

Class Description
Phalcon\Image\Adapter\Gd Requires the GD PHP extension
Phalcon\Image\Adapter\Imagick Requires the ImageMagick PHP extension

Implementation

Output:

Phalcon Images 1

Resizing Image

We can resize image with proper ratio maintenance by using different methods.

\Phalcon\Image::WIDTH

It is used to change the width of the image but keeps the ratio maintains. If we specify height then it is ignored.

Output:

Phalcon Images 2

\Phalcon\Image::HEIGHT

It is used to change the height of the image but keeps the ratio maintains. If we specify width then it is ignored.

Output:

Phalcon Images 3

Cropping Image

It is used to crop the image by 200px*200px.

Output:

Phalcon Images 4

Rotating Image

It is used to rotate throughout 360 degree as per requirement.

Output:

Phalcon Images 5

Sharpening Image

The sharpen() method takes integer value between 0 (no effect) to 100 (very sharp).

Output:

Phalcon Images 6

Blurring Image

Output:

Phalcon Images 7
Next TopicPhalcon View





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA