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] 2   Go Down

Author Topic: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg  (Read 12545 times)

0 Members and 1 Guest are viewing this topic.

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #1 on: November 30, 2010, 04:53:50 pm »

Clearing the exif table in the database should be enough.
Logged

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #2 on: November 30, 2010, 05:07:11 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #3 on: November 30, 2010, 05:11:08 pm »

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

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #4 on: November 30, 2010, 06:01:35 pm »

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

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #5 on: November 30, 2010, 06:08:57 pm »

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

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #6 on: November 30, 2010, 06:22:51 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #7 on: November 30, 2010, 06:38:45 pm »

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

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #8 on: November 30, 2010, 08:49:44 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #9 on: November 30, 2010, 10:36:32 pm »

Is "cpg14_exif" the exif table you are referring to?
If cpg14x is your table prefix, yes.


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

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #10 on: April 10, 2011, 11:05:42 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #11 on: April 11, 2011, 10:30:09 am »

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

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #12 on: April 11, 2011, 11:56:00 am »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #13 on: April 11, 2011, 12:17:41 pm »

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

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #14 on: April 11, 2011, 12:46:44 pm »

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
Logged

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #15 on: November 11, 2011, 05:02:50 am »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #16 on: November 23, 2011, 10:45:44 am »

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

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #17 on: November 24, 2011, 03:08:44 am »

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
Logged

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #18 on: November 24, 2011, 10:30:56 am »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reload Keywords and EXIF data from changed/updated images/jpgs into cpg
« Reply #19 on: November 24, 2011, 12:19:09 pm »

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

Page created in 0.025 seconds with 20 queries.