Avatar Size Need To Be Exactly Square? (General)

by Magma, Friday, February 20, 2015, 22:55 (3353 days ago)

In the admin I have avatars set to 150x150 but when people upload their avatar depending on the size of their picture the avatar can output at 150x80, 150x110 etc

How can I make it so images uploaded for avatars are exactly a square 150x150?

Any help please.

Avatar

Avatar Size Need To Be Exactly Square?

by Micha ⌂, Saturday, February 21, 2015, 10:08 (3352 days ago) @ Magma

Hi,

to keep the proportion of the origin image, you have to create a new image and copy the uploaded (and resized) image.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar Size Need To Be Exactly Square?

by Magma, Saturday, February 21, 2015, 12:40 (3352 days ago) @ Micha

Wow that's way over my head. :lookaround:

Avatar Size Need To Be Exactly Square?

by peterwall, Wednesday, August 12, 2015, 02:10 (3181 days ago) @ Micha

Hi.
Thanks for your nice sharing. But I wonder how can I accomplish
image resizing process. Do I need another image resizer to help change the size of images? I am almost a green hand here. Any suggestion will be appreciated. Thanks in advance.

Best regards,
Arron

Avatar

Avatar Size Need To Be Exactly Square?

by Auge ⌂, Wednesday, February 25, 2015, 14:22 (3348 days ago) @ Magma

Hello

In the admin I have avatars set to 150x150

To clarify that: You set the maximal values for width and height of the avatar image.

but when people upload their avatar depending on the size of their picture the avatar can output at 150x80, 150x110 etc

Works as designed.

How can I make it so images uploaded for avatars are exactly a square 150x150?

That works as Milo described it. If an avatar was uploaded (image1), the script resize it, if necessary, to a max of 150 in width and/or height. After that step, you (the script) have to create a new image (image2) with a size of 150x150 pixels and copy the uploaded and resized image (image1) into your new generated (image2).

This is not part of the script.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

RSS Feed of thread