Updating albums with larger sized images - doesn't get updated in the database Updating albums with larger sized images - doesn't get updated in the database
 

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

Updating albums with larger sized images - doesn't get updated in the database

Started by FireMotion, December 21, 2004, 10:17:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FireMotion

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)?

Hein Traag

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.

FireMotion

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.

Casper

Not in the current version, you have to manually change the database to the new dimensions.

But it is in the next version.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

FireMotion

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?

Casper

It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

FireMotion

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)