forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: Jake@poorman on March 16, 2004, 02:03:44 am

Title: [Solved]: Huge images... (resize problem)
Post by: Jake@poorman on March 16, 2004, 02:03:44 am
Hi guys,

I've just been trying to set up Goldmine and I think it's fantastic. There is one problem that I think's going to stop me using it;

I intend to allow lots of poeple to upload photos, which means I can't rely on them to size them properly.

I understand there is no way to delete the origional images automatically after the medium size one is generated. I've tried using the 'resize' tool and it will delete the origionals but then some of the medium size ones stops working.

I've been trawling this forum for a couple of hours and I've noticed that a number of people are experiencing this problem and that no one has an answer for it.

I'm hoping that someone has developed a fix as I'd love to use the system as I think it's far better than anything else out there.

Best wishes,

Jake
Title: [Solved]: Huge images... (resize problem)
Post by: Joachim Müller on March 16, 2004, 08:35:21 am
thanks for looking closely, the software is not called Goldmine, but Coppermine :wink:
I'm not sure to what threads you are refering to - next time, post a reply to the thread your question deals with. If you want to restrict people from uploading large pics, just set the max filesize to some value that makes sense for you...

GauGau
Title: [Solved]: Huge images... (resize problem)
Post by: Jake@poorman on March 16, 2004, 10:36:56 am
Hi,

Thanks for your reply. My appologies for getting the name wrong I've also been using Goldmine CRM all day and the name got stuck.

The issue is I don't want to stop people from uploading large images, I just want to get rid of the large versions once the medium ones are made.

A topic which covers this was;
http://forum.coppermine-gallery.net/index.php?topic=4063

The reason I didn't continue with it was that it was marked as solved, even though it perhaps wasn't.

Thanks,

Jake
Title: [Solved]: Huge images... (resize problem)
Post by: Casper on March 16, 2004, 11:11:48 am
That topic was solved, as here;  The file to edit is the displayimage.php.  

Quote from: "tarique"
Replace this line
Code: [Select]
if ($CONFIG['make_intermediate'] && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']) {

With
Code: [Select]
   if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
      $condition = true;
    }elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){    
      $condition = true;
    }elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){    
      $condition = true;
    }else{    
     $condition = false;    
    }

               
    if ($CONFIG['make_intermediate'] && $condition ) {

 


This cured the problem of pics not showing under the conditions described in that thread, i.e., max aspect set to height, pics in landscape, re-size tool used to remove original pics.  
All reported this worked for them, so was solved.
Title: [Solved]: Huge images... (resize problem)
Post by: Jake@poorman on March 17, 2004, 03:59:31 pm
Hi guys,

In the end I just wiped and reinstalled and it all works perfectly now. It's a great peice of software so thank you!

Best wishes,

Jake.