Center picture for profile picture

See all posts Reply

Center picture for profile picture new!
by Remco, 6 years, 4 months ago
How do i crop an image for an profile picture? that i want square?

now i use:
$handle->image_resize = true;
$handle->image_x = 250;
$handle->image_y = 250;
$handle->image_ratio_crop = true;

But how do i make it the centre of the picture that is kept? so cut of on both sides equal until the picture is square?Reply
Re: Center picture for profile picture new!
by colin, 6 years, 4 months ago
Your code here will resize.

You can achieve what you want by using image_crop, depending for instance on what you can read in image_src_x and image_src_yReply