Posted on: 11/18/05 08:25pm
By: jordydme
Hi,
I have spent a good dael of time hunting around for some sort of pluggin that will help less web savy people upload photos to their profile without having to know how to resize an image to the propper specs.
Anyone know of a good solution. I know a lot of folks don't know how to resize an image.
Tanks,
Jordy
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 03:27am
By: Dirk
Why not let Geeklog do the resizing? See config.php:
// If you set $_CONF['image_lib'] below, you must supply a path for the library
// you will use. Setting this also assumes that if a photo is uploaded that is
// too big either by the image sizes below or by overriding them using the
// upload object then the library you choose will attempt to resize the image.
// Leaving this value empty disables this feature
$_CONF['image_lib'] = ''; // can be one of 'netpbm', 'imagemagick', 'gdlib'
[...]
// User photo settings
$_CONF['max_photo_width'] = 128; // In pixels
$_CONF['max_photo_height'] = 128; // In pixels
$_CONF['max_photo_size'] = 65536; // 65536 = 64KB
bye, Dirk
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 08:05am
By: jordydme
Dirk,
Thnaks for the rply. You know, I did see that info in the config file and I did adjsut the pixel settingings a bit. Unfortunately, I did not understand the resizing instructions well unough to implement that feature.
So, do I set this variable like this:
$_CONF['image_lib'] = ' http://mysite.com/path/to/netpbm/or/imagemagic';
or is it like this:
$_CONF['image_lib'] = 'http://mysite.com/path/to/library';
I don't even know what is meant by "library", or if I have one already. Or do I create one?
Do I have to install one of those apps like imagemgic, or is it already there? I do have gallery installed and the GL_gallery2 pluging as well so I must have some resizing application installed right?
What is meant by this: "or by overriding
them using the upload object" - Is "
them" the settings
I would be so pyhsched if this application just lets people upload a photo of any size and then the application would resize ti automaticallly. Is that how it works? Lastly will this feature actuallly scale down the file size of the image? or jsut resize it's demensions?
Sorry if this stuff is obvious but my inexperience makes it hard to fill in the blanks.
Jordy
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 08:45am
By: Dirk
$_CONF['image_lib'] only holds the name of the library you're using - one of the 3 listed in config.php just after that variable.
Check with your hosting service to learn if you have any of them installed and where they reside.
If you have ImageMagick, you will have to set the full path to the "mogrify" executable, ($_CONF['path_to_mogrify']), for NetPBM, set the path to the directory(!) containing the NetPBM executables ($_CONF['path_to_netpbm']). For GDlib, no further configuration is necessary.
[QUOTE BY= jordydme] I do have gallery installed and the GL_gallery2 pluging as well so I must have some resizing application installed right?[/QUOTE]
I haven't tried Gallery 2 yet, but Gallery 1 used NetPBM, IIRC.
[QUOTE BY= jordydme] What is meant by this: "or by overriding them using the upload object"[/QUOTE]
Ignore that. It only means that PHP code (e.g. a plugin) using the image upload functions could use its own values for the image size.
[QUOTE BY= jordydme] I would be so pyhsched if this application just lets people upload a photo of any size and then the application would resize ti automaticallly.[/QUOTE]
That's what it does.
bye, Dirk
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 09:34am
By: jordydme
Dirk,
I will contact my host thanks for the speedy reply. Yousaid the the imagaes will resize but does it scale down file size as well. So, ievn though the dimensions are smaller, will i still have a huge photo on my server if someon uploads a 3MB photo?
Also, is there a resizing feature for the avatar as well?
Thanks,
Jordy
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 09:50am
By: Dirk
Resizing will create a new image file and the uploaded file will be discarded. So the resized image will usually be (much) smaller.
If you check your config.php again, you'll see that there are separate settings for story images and user photos (avatars). So, yes, it applies to both.
bye, Dirk
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 10:16am
By: jordydme
That is awsome!! I jsut sent an email to my host. When they get back to me I will make the adjustments. Hopfully I will have enought to go on from there.
Thanks alot for the help,
Jordy
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 12:09pm
By: jordydme
okay,
A friend of mine just set his up. We are on the same hosting service and have the same GL and phpbridge running with Gallery2 integration.
He told me to use these settings:
$_CONF['image_lib'] = 'imagemagick';
$_CONF['path_to_mogrify'] = '/usr/bin/mogrify';
This is how I set my GL config:
$_CONF['image_lib'] = 'imagemagick';
$_CONF['path_to_mogrify'] = '/usr/bin/mogrify';
$_CONF['keep_unscaled_image'] = 0; // 1 = keep original images
// Story image settings
$_CONF['max_image_width'] = 300; // In pixels
$_CONF['max_image_height'] = 300; // In pixels
$_CONF['max_image_size'] = 1048576; // 1048576 = 1MB
// User photo settings
$_CONF['max_photo_width'] = 200; // In pixels
$_CONF['max_photo_height'] = 200; // In pixels
$_CONF['max_photo_size'] = 1048576; // 65536 = 64KB
this is the error i am getting when trying to upload a 900KB photo to my GL user profile:
Image, DSCF6096.JPG had trouble being resized: sh: line 1: -resize: command not found
I was also wondering about the max file size settings.
Question:
Will that setting tell imagemagick what file size to scale images down to? or is it the set limit on the max file size you can upload for resizing to the specified pixel dimensions? I tried setting the max file size file size to this:
$_CONF['max_image_size'] = 1048576; // 1048576 = 1MB
I had no luck, same error as above. I thought it was a file size issue. but not sure now. cause athe files I tried to upload to my GL profiile were all below 1MB
Thanks for listening,
Joryd
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 12:29pm
By: Dirk
Did you remove the two slashes // in front of the $_CONF['path_to_mogrify'] variable? Otherwise it's commented out and not used.
As for the file size: If the uploaded file exceeds the max. filesize, Geeklog would reject the file and not attempt to resize it.
bye, Dirk
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 12:42pm
By: jordydme
Dirk,
You are the man!...Thnanks for that and all of the explainations. I had left those slasses in
Much appreciiated help on a Sat.
Jordy
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 12:44pm
By: jordydme
hey one last point...does resizing a photo also change the file size...I hope it does.
Jordy
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 12:57pm
By: Dirk
[QUOTE BY= jordydme] does resizing a photo also change the file size[/QUOTE]
I already explained that a few posts above ... Yes, it does.
bye, Dirk
GL profile image resizing plugin? KNOW OF ONE??
Posted on: 11/19/05 01:07pm
By: jordydme
Thanks,....sorry about that
Jordy