Image in a 60 x 60 space...

See all posts Reply

Image in a 60 x 60 space... new!
by Luca, 17 years, 10 months ago
I know you hate me, but it's the last question!!

I'm trying to upload images so that the uploaded image is resized to stay in a 60 x 60 box without losing the original sizes.

I do:
$handle->image_resize = true;
$handle->image_x = 60;
$handle->image_ratio_y = 60;

Where is the error??Reply
Re: Image in a 60 x 60 space... new!
by colin, 17 years, 10 months ago
As per the documentation:

$handle->image_resize = true;
$handle->image_x = 60;
$handle->image_y = 60;
$handle->image_ratio_crop = true;
Reply
Re: Image in a 60 x 60 space... new!
by Luca, 17 years, 10 months ago
Thank you for your reply, but I don't want to crop my image.
I wish that:

if width>height so $handle->image_x = 60;
if width<height so $handle->image_y = 60;

I don't want an image 60x60 but I wish an image that always is resized so that it's longer side is no more than 60px

Thank youReply
Re: Image in a 60 x 60 space... new!
by colin, 17 years, 10 months ago
In that case, you can do:

$handle->image_resize = true;
$handle->image_x = 60;
$handle->image_y = 60;
$handle->image_ratio = true;
Reply
Re: Image in a 60 x 60 space... new!
by Luca, 17 years, 10 months ago
thanks a lot, Colin!Reply