Mapping Metadata to Zenphoto

Having read the "Zenphoto image metadata processing" page, and then having uploaded the IPTC Reference Image (https://iptc.org/std/photometadata/examples/IPTC-PhotometadataRef-Std2019.1.jpg) to Zenphoto, I can see how the fields map across.
However, there isn't a mapping from the metadata to the Zenphoto Custom Data field. Would it be possible to create one, please? Any little-used metadata field that will hold a lot of characters would be fine for me (maybe the JPEG Comment field).
The reason is that I am digitising a lot of old photographs, and want to use the Custom Data field as a notepad to record items of interest, such as any text written on the back of the photo. For data security, I would like to keep all of the data with the image, so adding it into the metadata seems the best way to do so, but I then need a way to copy it across to Zenphoto.

Comments

  • acrylian Administrator, Developer

    For data security, I would like to keep all of the data with the image, so adding it into the metadata seems the best way to do so, but I then need a way to copy it across to Zenphoto.

    I don't understand the security point. When Zenphoto imports data it is the same as if you would enter it manually as it all is stored in the database.

    The custom data field is a general purpose field not specifialy for metadata.

    It would be possible to createa plugin to cover additional meta data fields or to add it via filter to the custom data field.

    Please understand that there will not be ready solutions for such specificl requirements without some own coding.

  • I'm thinking catastrophes here, but if Zenphoto ceased to exist and we then had to migrate the images and their data (e.g. Titles) to another platform, how would we do it? What preparations should we make in advance?
    I'd assumed that this would be simpler if the data was embedded in the image file, but maybe it doesn't matter.
    Perhaps I'm a pessimist, but better to be prepared.

  • acrylian Administrator, Developer
    edited May 2021

    I'd assumed that this would be simpler if the data was embedded in the image file, but maybe it doesn't matter.

    Ah, okay, I apparently missunderstood . Embedding metat data is of course a very good idea for that reason. I thought you were referring to the fear of making data available of images you don't want to have public. Since Zenphoto not just displays from metadata but imports it.

    Generally data migration can also be done via code, all lies in a MySQL database so technically a migration tool could be written to export and import data to somewhere else (like we once had a now unsupported WordPress import tool for posts and pages to Zenpage aricles and pages). Naturally that requires the knowledge to do so but it is possible.

    Besides we have no plans to cease to exist ;-)

  • I've had a chat with Nick 7635 (I'm helping with his project). What Nick didn't mention was that several thousand photo's have already been digitised and the "Title", "Explanatory Text" etc recorded in Excel against the scanned filename
    My thought would be to add a plugin which could

    • Upload the data in CSV format
    • step through a line at a time
    • Update the MySQL for "image" with a new "subject", "Title", "Tags" etc
      Powerful - but potentially dangerous! If / when I get it working I'll make available to download.
      I'm reasonably proficient (OK, slightly rusty...) in HTML5, CSS, PHP and MySQL. Object Oriented and Classes are newish and I'll have to learn as I go along. Wish me luck!
  • acrylian Administrator, Developer
    edited May 2021

    That's great. Using a CSV is a good way to do this (if really a lot images you may need to do this in smaller chunks to not overload the server possibly). But instead using the database direcltly would really recommend to use the object model for that.

    Especially tags are not to be added to one table but via three tables. It is certainly possible to do that via queries - naturally we do that internaly as well - but using the object model has it saver against any future changes.

    We can't teach PHP obect model itself as there are better resources but we have a general guide to our specific object model on our user guide: https://www.zenphoto.org/news/zenphotos-object-model-framework/

    And of course we're here to help as much as we can.

  • @acrylian - many thanks - it will certainly be my aim to use the object model - (slightly) more work now for an awful lot less later, especially when ZenPhoto is upgraded. Also, thanks for the link.

Sign In or Register to comment.