Function downloadAvatar
downloads a file from a url and stores it locally for avatar use by id_member. - supports GIF, JPG, PNG, BMP and WBMP formats. - detects if GD2 is available. - uses resizeImageFile() to resize to max_width by max_height, and saves the result to a file. - updates the database info for the member's avatar. - returns whether the download and resize was successful.
Package: SMF
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs-Graphics.php
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs-Graphics.php
string |
$url |
The full path to the temporary file |
integer |
$memID |
The member ID |
integer |
$max_width |
The maximum allowed width for the avatar |
integer |
$max_height |
The maximum allowed height for the avatar |
boolean
|
Whether the download and resize was successful. |