Jump to content

How can I use $image->size, from small to change the size of the image canvas?


*Most Powerful Pony!*
 Share

Recommended Posts

I have an image 500x300 

I need to apply the resizing to 150x150 without cutting edge. 

Thus in any case, I need to have the image canvas size 150x150 

When you use $ image->size (150, 150), we obtain the desired result (cropping). 

When using $ image->size (150, 150, array ('cropping' => false)) our image circumcised according to the greatest height, canvas change proportionally. / / 150x90. 

Need an image 150x90 position in the center of the canvas 150x150. 

You can do this using the API?

post-2003-0-65413500-1392706786_thumb.pn

Link to comment
Share on other sites

First I don't understand why you would send "unnecessary" pixels over the internet. I would say, don't send them and make the space you need with the HTML container element.

Second, why do want to spoil server CPU for this.

Third, if you want to make it your self difficult. here is the documentation.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...