Resising photo's and automatic deleting the old Resising photo's and automatic deleting the old
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Resising photo's and automatic deleting the old

Started by bartvanstratum, August 31, 2004, 02:51:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bartvanstratum

Hello,

I just installed coppermine on my website, searched through all the setting bet can't find one thing.....
I want to make different groups so that friends can also upload pictures. One problem: i only have 150MB of webspace and if they upload about 100 pictures from their Ixus400 camera's my webspace is allready used. I found the option to make intermediate pictures, it also works but the original (large) pictures are also saved and can be viewed by clicking on the intermediate picture. I want GD2 to resize the original pictures to something like 800x600 and remove the original pictures automatic. What settings do i need to change in order to get this working?

Thanks in advance,
Regards,
Bart van Stratum

kegobeer

Have you read the documentation that comes with Coppermine?  You should find all the answers to your questions in there, like limiting the disk quota for the groups and setting the max file size allowed.

As for deleting the original after the upload, search the boards - I believe there's a mod/hack for this already.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

bartvanstratum

I've read the documentation, found the option to resise the pictures but can't find an option to automatic delete the original pictures.I also searched the mod/hack forum for this option, i found quite some requests for something like this but there was always posted a reply that this will be realised in a future version, i didn't actually found the mod/hack.

Perhabs i'm searching wrong, if anyone knows where i can find this mod/hack then i would be happy to hear.

Regards,
Bart van Stratum

kegobeer

About limiting the max file size and disk quota:  Did you find how to limit the maximum file size allowed, and the maximum amount of space each user has?  That will prevent you from running out of space on your server.

About the hack: The hack apparantly hasn't been written.  Upon first glance, it seems like it would be pretty easy to do, but there's a bit of db manipulation that has to be done also.  I may be able to come up with something, using code from util.php to accomplish the task, but it's not a high priority and I can't give any estimated completion time.  Using GD/ImageMagick to resize an image sometimes results in larger file sizes, not smaller, so you may find that you're not actually saving any space.

As a webmaster, I always resize my images before uploading them.  Partly because it's a huge waste of space to have a 2mb image when a 50k image does the same thing, and partly because I want to spare my visitors long wait times during picture loading.  I would make sure my members understood that huge images aren't allowed and should be scaled down before uploading.

My recommendations are to ask your members to ensure their image file sizes are reasonable prior to uploading, and that you set your group disk quotas to make sure one of your members doesn't eat up all the server space.  Default max size is 1024kb, and disk quota is 1024kb.  If 1mb isn't enough, just increase it to your liking.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

to add to what kegobeer said, I recommend suggesting to your users who run Windows XP to take a look at the XP Publisher (refer to the coppermine docs for details), as it does the resizing on the client as well, for those who don't know how to manipulate files before uploading them.

Joachim

bartvanstratum

I did find the option to limit both the max. file size and the max diskspace used. My website has 150 MB so i set each user to 10MB diskspace. My friends aren't very experienced with programs like paint shop pro or photoshop so they can't resize their pictures at their own computer. I set the intermediate picture to a max size of 600pix, i've uploaded a picture for test and it worked ok. Picture was made smaller and with that filesize they can store about 100 - 130 pictures within their 10MB space. Only problem is that they use a 4 Mpixel camera, so with the original picture also on my site they can only upload only about 10 pictures!

I'll ask them to upload as much as possible with XP publisher, and i can remove the large original pictures by hand with the administration tools, but it would be realy helpfull if there would be a add-on in the future what would do this automatic!

Thanks for the help,
Regards, Bart van Stratum

jernst

I have a simple hack for doing exactly this.  In the include/picmgmt.inc.php file, "add_picture" function, add the following lines of code immediately after the "$thumb = ..." line:

//Joe Ernst - resize all images
    if (!resize_image($image, $image, $CONFIG['picture_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']))
       return false;
       clearstatcache();
//end Joe Ernst

This will effectively make Coppermine think that the images were small to begin with.
-Joe