forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: FireMotion on December 21, 2004, 10:17:34 am

Title: Updating albums with larger sized images - doesn't get updated in the database
Post by: FireMotion on December 21, 2004, 10:17:34 am
Hello everyone. I want to:
* Update my albums with larger (higher resolution) images.
* So that: intermediate images are 640px; the original (large) images are 1024px

This is my current situation:
* Old pictures were max 500px
* Uploaded pictures were max 500px
* So no intermediate image were used.

This is what I'm trying to do:
* I set the intermediate picture option to max 640px
* Uploading pictures that are max 1024px
* Updating it with the Admin Tools (resize+update thumbnails)

This is the problem:
* The Admin Tools do make the intermediate pictures, BUT:
* The pictures don't get updated in the database. At least 'filesize', 'total_filesize', 'pwidth', 'pheight' should be updated in the database, but they aren't. Consequence is that when viewing the pictures, CPG shows the original 1024px picture, but with the old 500px dimensions, not using the intermediate image that was created with the Admin Tools.

Does anyone know how to fix this painlessly (I want to do this with all my 90+ albums, 4700+ pictures)?
Title: Re: Updating albums with larger sized images - doesn't get updated in the database
Post by: Hein Traag on December 21, 2004, 10:26:37 am
So you changed the setting at "Max width or height for uploaded pictures/videos (pixels) " to 1024 and then reuploaded the pictures (with the 1024 width). And with no good result.

I bumped into to this problem a while ago and resolved my problem by first deleting an album and the pictures in it. And after that reuploading the new pictures. This ensures the pictures are added to the database in a correct way.

But it would be nice feature to be able to upload a picture again with a bigger or smaller dimension and then have cpg update the database about the what size the picture is etc.
Title: Re: Updating albums with larger sized images - doesn't get updated in the databa
Post by: FireMotion on December 21, 2004, 10:33:48 am
Yeah, but I want to keep the titles, captions, hits (views), votes, comments for the images intact.

I know I can delete, then redo the whole thing (adding the pictures from scratch to ensure everything is added correctly to the database), but I'm sure there's a nice way to force CPG to update the pictures in a directory, AND to ensure everything is added correctly to the database anyway.
Title: Re: Updating albums with larger sized images - doesn't get updated in the databa
Post by: Casper on December 21, 2004, 11:33:52 am
Not in the current version, you have to manually change the database to the new dimensions.

But it is in the next version.
Title: Re: Updating albums with larger sized images - doesn't get updated in the databa
Post by: FireMotion on December 21, 2004, 11:49:44 am
Okay, thanks.

If I'd manually change the database, then the following fields are the only ones I need to change, right?
table pictures: 'filesize', 'total_filesize', 'pwidth', 'pheight'

And 'filesize', 'pwidth', 'pheight' are from the original image;
'total_filesize' is original + normal (intermediate) + thumb, right?
Title: Re: Updating albums with larger sized images - doesn't get updated in the databa
Post by: Casper on December 21, 2004, 11:57:36 am
Yes, those are the ones. 
Title: Re: Updating albums with larger sized images - doesn't get updated in the databa
Post by: FireMotion on December 21, 2004, 11:59:48 am
Thanks! I'll see if I can figure out how to script this (I'm definitely not going to do this one by one using phpMyAdmin :P)