Gregwar / Image

A PHP library to handle images
MIT License
1k stars 191 forks source link

Added a percentReszie() method #47

Open abhimanyu003 opened 10 years ago

abhimanyu003 commented 10 years ago

Added percentReszie() method to quickly increase or decrease the image size to given percent.

If want to increase the size use positive integer. If want to decrease the size use negative integer.

Example uses:

Image::open()->percentReszie(50)->html('Re-sized to 50 percent')

Image::open()->percentReszie(-50)->html('Re-sized to negative 50 percent')

Gregwar commented 10 years ago

Hello, this can already be done by:

$image->resize('50%')

abhimanyu003 commented 10 years ago

Shh didn't notice that, I think language need to little clear for this. 0% == original image 50% == increase the image by 50% -50% == decrease the image by 50% This will be easier for calculations

Currently its 100% == original image 150% == increase the image by 50%