Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Updating albums with larger sized images - doesn't get updated in the database  (Read 4230 times)

0 Members and 1 Guest are viewing this topic.

FireMotion

  • Coppermine newbie
  • Offline Offline
  • Posts: 14

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

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl

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.
Logged

FireMotion

  • Coppermine newbie
  • Offline Offline
  • Posts: 14

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.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231

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

But it is in the next version.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 14

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

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231

Yes, those are the ones. 
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 14

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)
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.