Reload Keywords and EXIF data from changed/updated images/jpgs into cpg Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
 

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

Reload Keywords and EXIF data from changed/updated images/jpgs into cpg

Started by peterlustig, November 30, 2010, 04:38:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

peterlustig

Hi everybody,

is there any way for cpg 1.5x to inspect the tag-information of the image files on the server and to update the database with the (updated) exif data and keyword tags?

What I want to do:

a) I have reorganized my (offline) image database, especially the keyword structure. Thereby I have added quite some new keywords to many files. (OK, I know, ideally you always stick to the once developped structure, but once in a lifetime most things need an overhaul...)
b) I have also re-evaluated my up to now quite conservative attitude towards metadata and would like to publish more datafields of the exif data.

I suppose that to achieve a) the only (practically) possible way is to re-upload my jpgs to the server and have cpg reinspect them. To achieve b) it is effectively the only way, as the relevant exif tags are not even present in the files currently residing on the server.

However -- how can I ask coppermine to perform this update? Is this possible at all?

Any help would be greatly appreciated.

Cheers, Peter

Αndré


peterlustig

And how do I then bring cpg to reload the exif data out of the jpg into the table?

Αndré

It automatically reads it from the file if there's no entry in the database. Do a backup for the case it won't work.

peterlustig

Vielen Dank, Andre, but I don't seem to correctly understand you.

As far as I understand you, you recommend to clear the "cpg14x_exif" table. However, if I am able to handle my phpMyAdmin correctly, it seems to me, that in this table only the specifications laid out in cpg's "EXIF Manager" are stored, i.e. which exif fields are of interest and should be displayed -- I can't find the data in it, that is displayed in the file information area under the picture. In cpg's exif manager I already changed which tags I'd like to have additionally displayed.

I then uploaded one test image, in which I deleted EXIF data AND keywords. However, still the old information is displayed. And I also upload a file in which more keywords were present. No change in the displayed information....

As for the keywords, I suppose that those are stored in the field "keywords" within the "cpg14x_pictures" table. At least cpg displays these keywords (which corresponded to the keywords in the "old" jpgs iptc data), and not the keywords in the iptc tag now present on the server.

So, once again: I suppose cpg displays the file information data (i.e. exif AND keywords) out of some of its sql tables. I suppose that the data was written into those tables when the files were batch-added to the database for the first time. And if I want the displayed information to reflect the "new" information in the new tags of the new jpgs (which of course still have the same filename), I will need coppermine to update the relevant tables. But I don't know how to do this....


Αndré

IPTC data is only read while adding pictures to the database. But EXIF data should be always read / refreshed if there's no data in the exif table and the picture has EXIF data.

peterlustig

@EXIF: ok, but where is the exif data stored? In the "cpg14_exif" I don't find relevant data. So where does cpg take the "old" information from? It's not any more in the tags of the jpg

@Keywords: is there any way to ask cpg to reload the keyword-data in the image tags into the database?

Αndré

All exif data is stored in the exif table. If you want to overwrite all titles and descriptions with the IPTC keywords, we'll have to create a mod or a plugin with a button 'refresh IPTC data' or something like that.

peterlustig

@Exif: Is "cpg14_exif" the exif table you are referring to? As I said, in this table there is nearly no information stored in my sql database. As far as I can see it, this table only stores the information, which exif-datafields should be read when adding pictures to the database. So, the displayed EXIF data has to reside somewhere else, but I cannot find it.

@Keywords -- ok, I understand that this functionality is not implemented yet and would have to be written. The titles/keywords get read out of the iptc comments during batch add of the images, so I suppose a mod could build on existing code. I of course would be very happy about this functionality, but I don't know how much demand there is for it.

Αndré

Quote from: peterlustig on November 30, 2010, 08:49:44 PM
Is "cpg14_exif" the exif table you are referring to?
If cpg14x is your table prefix, yes.


Quote from: peterlustig on November 30, 2010, 08:49:44 PM
So, the displayed EXIF data has to reside somewhere else, but I cannot find it.
Maybe we're talking about different things. Please post a link to your gallery (especially to a picture with exif data that isn't correct in your opinion).

Walkinman

Quote from: peterlustig on November 30, 2010, 08:49:44 PM
@Keywords -- ok, I understand that this functionality is not implemented yet and would have to be written. The titles/keywords get read out of the iptc comments during batch add of the images, so I suppose a mod could build on existing code. I of course would be very happy about this functionality, but I don't know how much demand there is for it.

If this mod could be added, I would also appreciate it. Many of my older images had their keywords truncated when I added them to cpg, because the default setting was something like 256 characters. It would be great if a mod can be written to re-reada IPTC data, or even specifically just keywords, and added to the "edit file" page.

Thank you.

Cheers

Carl

Αndré

A quick & dirty mod that replaces all existing keywords of a picture with the keywords from the IPTC data should be created quite easy. Do you want to just overwrite all existing keywords?

Walkinman

Hey André

That would be fine, for me anyway, thanks. Something like the "Read EXIF info again" button that can be applied to particular images would be great.

Thank you.

Cheers

Carl

Αndré

I initially thought about a batch script that updates all pictures. Adding such a button should be also quite easy, as we already have some plugins that do similar things (e.g. the file_replacer plugin). Can you please attach a small image with IPTC data? Thanks.

Walkinman

hey André

Sure. Here's a file with IPTC data embedded.

Yes, I think with the file replacer, that would be a good option to also re-read IPTC data, after replacing an image for example.

For me, the only data I would want re-read is the keywords, not the other information like Caption and Title, etc. I'm not sure what would be the best choice for everyone.

Cheers

Carl

Walkinman

Hey André

I was wondering if there might be any chance of some progress on this mod? It'd be great if when I reload a file, I can have the option of cpg re-reading the EXIF/IPTC data as well.

Thanks so much.

Cheers

Carl

Αndré

How exactly do you update your files? Do you replace the files via FTP and start the admin tools or do you use the file replacer plugin? It may be the easiest option to add some checkboxes like "Update EXIF data" and "Re-read IPTC data" to the file replacer plugin.

Walkinman

Hey André

Thanks for following this up. I use the File Replace plugin. I wasn't even aware I could use the Admin Tools to do that; what I've done, in the past, is ftp an image to the site, and then use the replacer plugin. But from a quick glance it seems the Admin Tools will allow me to more easily batch replace files which will be much better.

Adding a "re-read IPTC data" and EXIF would be grea, especially if it's harder to do it with a batch process via the Admin Tools. I don't use the exif data myself, but for others that do it might be good. But an option that allows controlling which files to update would be great .. the Admin Tools only does entire albums, correct? If this is the case, the replacer plugin would be my preference.

I'm going to play with the Admin Tools feature there a bit more. From what i'm seeing, it might be perfect, if it can incorporate new IPTC data as well (as an aside, I'm also in the process of adding larger versions of older photos to my site, so this feature is great, thanks).

I really appreciate your assistance here.

Thanks

Cheers

Carl

Walkinman

Hey André

I notice on the "Edit File" page, from the link underneath a fullsize image, there is a "Read EXIF info again" button .. something like that for IPTC data would be a huge help, even if just as a place to start. It wouldn't allow batch changes, but would allow people to upload a new file, with different IPTC data embedded, have the database re-read everything, and bring in any changes. That would be a benefit, if that's an easier mod.

Thanks again.

Cheers

Carl

Αndré

Just for clarification: re-reading the IPTC data means overwriting the existing title/descriptions/keywords, right? Or do you want to merge them? Maybe I'll add both possibilities to the file replacer plugin.