Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 09:13 pm EST
Geeklog Forums
GL profile image resizing plugin? KNOW OF ONE??
Status: offline
jordydme
Forum User
Full Member
Registered: 11/03/05
Posts: 135
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
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
8
9
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Why not let Geeklog do the resizing? See config.php:
// 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
Text Formatted Code
// 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
5
4
Quote
Status: offline
jordydme
Forum User
Full Member
Registered: 11/03/05
Posts: 135
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
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:
Text Formatted Code
$_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
5
4
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
$_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.
I haven't tried Gallery 2 yet, but Gallery 1 used NetPBM, IIRC.
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.
That's what it does.
bye, Dirk
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?
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"
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.
That's what it does.
bye, Dirk
6
8
Quote
Status: offline
jordydme
Forum User
Full Member
Registered: 11/03/05
Posts: 135
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
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
6
9
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
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
5
9
Quote
Status: offline
jordydme
Forum User
Full Member
Registered: 11/03/05
Posts: 135
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:
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
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:
Text Formatted Code
$_CONF['image_lib'] = 'imagemagick';
$_CONF['path_to_mogrify'] = '/usr/bin/mogrify';
This is how I set my GL config:
Text Formatted Code
$_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:
Text Formatted Code
$_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
6
6
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
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
4
9
Quote
All times are EST. The time is now 09:13 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content