![]() |
Avatar Creator/Resizer
This is more like an additional file than a "hack".
What it does is allow members to resize a jpeg to the standard 64x64 jpeg....while keeping the aspect ratio - and use it as their avatar. This isn't FULLY automated because when a jpeg is submitted, it will send BACK a resized version, then the user can use that file to upload it to wherever. Installation: Upload the attached file to your forums directory. Put a link somewhere to let your forum users know about the new feature. Suggested template is: modifyavatar_customupload UPDATE: Uploaded Version 1.01 (Added two custom variables. Can keep aspect ratio and avatar max size. ) UPDATE: New v1.02 (Fixed some typos) |
Installed php file, getting this following error:
Fatal error: Call to undefined function: imagecreatefromjpeg() in /usr/local/psa/home/vhosts/skytronic-forums.com/httpdocs/forum/avatarcreator.php on line 76 |
What version of PHP are you using?
That function is part of PHP 3.0.16+ and PHP 4.0.0+ |
Wow. This looks really cool.
|
This hack will require your PHP to have GD support compiled in.
|
great !!!
but i have every time the same error.. "Sorry, only jpeg pictures can be resized here!" but my pic are a JPG... |
O.k this hack works fine to me, only problem I like to solve is to make the pictures as it's on the setting for my board 50x50 and not as 64x15 witch is the size that the avatar hack is doing.
any sugestion? |
Ah, thanks freddie forgot about the GD library :o
BlueWolf, download the updated file and set $aron to 0 and set $sz to 50. |
Quote:
|
I am probably doing something real stupid, but if I create a link to that php file I get.
PHP Code:
|
PHP Version 4.0.6
Quote:
|
Do you have demo?
|
Quote:
Sorry about this, it IS my first hack :D |
Quote:
|
Quote:
|
why only jpeg? may be gif for example?
|
The GD library doesn't support .gif any longer due to copyright issues.
|
Hmm...according to php.net the functions exist.
I didn't add gif support as a resized gif wouldn't look that great. [Edit] Freddies right, according to php.net Quote:
|
If you could modify this to allow a selection of either GD Lib or ImageMagick calls that would allow me to use it (need the GIF support). Yes I could just modify yours, but I thought you might want to put this option in a future release. Plus I am way too busy. ;)
BTW Thanks for your efforts. This is truly a great idea. :) |
If theres enough demand, I would be willing to add more options.
|
yes please add more options to it!
|
I like the idea. But the actual photo quality doesn't turn out too great. I wish it could sharpen and change the bightness/contrast. :) Thanks though, it will help the people who don't have any other options.
|
after upgrade to PHP v4.3.1 this hack doesn't work.
checkout the attachment....that's the image after resized. |
I get a strange blurry blue/black image like that no matter what jpeg I resize as well. :(
|
i have the same thing, bad bunny, which php and gd version u have on your system?
|
Quote:
Thanks Jbear6 |
Replace $dst_img = imagecreate($new_width,$new_height); with $dst_img = imagecreatetruecolor($new_width,$new_height);
|
Quote:
Jbear6 |
1. Trying to figure out what I need to put within my
modifycustomavatar template so I can link it accordingly. 2. When I run the function, there is no Keep Size Aspect Ratio function showing: http://www.futurelooksforums.com/for...tarcreator.php Help! |
anybody?
|
in modifycustomavatar template, place a link to that file in there....anywhere u want.
PHP Code:
|
Can we get support for the GIF format.
|
I've changed my own code to use the NetPBM package instead of PHP. Much better quality pictures, but unfortuneltly not ready for public release.
|
All times are GMT. The time now is 04:51 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|