IPTC handling

hi, first of all let me tell you how I was delighted to see that my photos embedded data were shown with no further effort by my side.
that lot of work I did to fill in the IPTC data was finally worth!
but now I'm struggling with some metadata that aren't displayed although the field isn't empty.
e.g. IPTCLocationName is not displayed and I couldn't find how to get it printed.
as a reference this is a photo that has the IPTCLocationName embedded, as all the other metadata, but doesn't show it.
http://www.indirizzofantasma.net/zenphoto/numeri-civici/69/0069.jpg.php
how should I go to solve my problem?
and also an additional related question: how can I manage the order the metadata are displayed?
«1

Comments

  • acrylian Administrator, Developer
    There is an option in the options image tab (I believe offhand) where you can enable what metadata files are imported and which not. I don't remember offhand if that is even supported.

    You cannot manage the order unless you do custom coding on your theme.
  • kyrd Member
    oh, yes I even forgot that I've setted those options since the beginning, fact is that it's set but doesn't show in the output
    (this is the actual html in my admin-options-page=options&tab=image:
    input id="IPTCLocationName" name="IPTCLocationName" type="checkbox" checked="checked" value="1" /> Nazione/Nome località primaria)
    what am I doing wrong?

    2nd question, yes I'm aware of that, can you suggest where/which file/s can I start editing with trial&error method?
  • acrylian Administrator, Developer
    1) I have to pass this to my colleague sbillard as he is the expert on the meta data things.

    2) You should first read the theming tutorial to learn the basics if you haven't already. Then you should get probably into the object model of Zenphoto. In short you will have to write a custom function to do what you wish.
  • kyrd Member
    1)ok, waiting...
    2)well, yes, I've been reading (quite a lot) here & there and willing to go further in my learning, but I'm only a photographer not a coder... nevertheless I'm enough expert in writing html and css and I've been dealing with some programming languages before. so, if I can't write a custom function by myself I can succesfully cut&paste and make it work and/or go back to the starting point if things don't work.
    I'm a bit surprised you say I should go into my theme? Am I wrong? I've been checking more or less all the files in there, but couldn't find where it is. I thought I should go into zp-core and there is where I found
    function updateMetaData()
    can I change the order in that array with no danger?
  • acrylian Administrator, Developer
    You should never touch core files as you will have to re-apply all change on every update of Zenphoto (which is recommend to do frequently naturally). Additionaly this could break dependent functionality in other places.

    So the way to do this is to either write a theme custom function or a plugin to achieve custom functionality. HTML and CSS will not help, you need PHP knowlegde for this.

    This function returns the an array of the metadata:
    http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetImageMetaData
    So you will need to use the data of this to create your custom sorted list.
  • This is all working correctly for me. Maybe your images have the field mis-coded? `Country/Primary Location Name` also becomes the Zenphoto `country` field. Is this the case for you?
  • kyrd Member
    yes, I have some photos with the location name filled in but it isn't retrieved by the sytstem, while sublocation does... the above linked photo is one of those which have the location name not printed out. none of those photos show that field even if in my admin is correctly set to active.
  • That link is not much use. We would need the actual image to see what is in its metadata. But, if you have some that work and some that do not, you should try to figure out what the difference is.
  • kyrd Member
    @sbillard - maybe I wasn't clear, so let me recap, my workflow is like that:

    1- I embed IPTC data in the photos
    2- every photo has title, byline, city, sub-location, state, country fields filled in
    3- some photos have the Location, keywords, special instructions fields filled in
    4- in zenphoto admin all the above fields are set to be shown, except for the special instruction field, which I don't need to show
    5- photos are uploaded to the server using the zenphoto uploader (no ftp)
    6- keywords become tags and are shown regularly when filled in
    7- all metadata are shown correctly except the Location

    I actually can read them also in the uploaded photos, both the resized (which has had the exif data destroyed, I guess by gd) and the original file, which I've retrieved back to my desktop.

    here are again the relevant links:
    http://www.indirizzofantasma.net/zenphoto/numeri-civici/69/0069.jpg.php = should click on [ + Info - ] to see the metadata (lacking the filled in location name)
    http://www.indirizzofantasma.net/zenphoto/albums/numeri-civici/69/0069.jpg = the uploaded original file, with IPTC & EXIF
    http://www.indirizzofantasma.net/zenphoto/cache/numeri-civici/69/0069_w413_h550.jpg = the processed file, EXIF destroyed

    something is clearly not working as expected at some point, but I can't figure out where exactly, I hope you can...
  • Probably we are failing to communicate somewhere. I have downloaded your image and looked at it with Zenphoto and Adobe Bridge. I see nothing present in the image metadata that is not present in Zenphoto.

    I guess I really do not know what you are refering to when you say location.

    It could refer to the image "location" column which is a Zenphoto field. That has in it `calle priuli ai cavaleti` which came from the IPTC `sublocation` filed. That field in the metadata list shows this value as well.

    It could refer to the IPTC `LocationName` field. That field contains `Italia`.

    It could refer to the IPTC `LocationCode` field. Your image has no data for that field.

    All the fields for which there is data except for the `headline`, the `date created`, and `copyright status` are shown when I click on the [ + Info - ] link on your site.

    So, just exactly what do you think is missing?
  • kyrd Member
    It could refer to the IPTC LocationName field. That field contains Italia.
    actually here is the problem, Country and LocationName are not the same thing, nor the same field.
    btw Country is well translated into Nazione, while State is Stato/Provincia and contains VE.
    according to my input, I do have Country field that contains Italia and LocationName that contains Cannaregio.
    if you can make use of an .ipt file (I can't read it, only import it as model), here is the link to http://www.indirizzofantasma.net/zenphoto/uploaded/0069.ipt
  • I have quoted to you exactly what is displayed in your IPTC metadata by Adobe Bridge. There is no translation done in IPTC fields as these are outside of the province of Zenphoto.

    Since Adobe and Zenphoto seem to agree on what metadata is in your image I fear there is nothing we can do for you.
  • kyrd Member
    it's allright, at least with your help I've narrowed the issue: might well be that the software I use for managing my photos disagrees with adobe (actually I don't like bridge at all). I'll investigate more and eventually report my findings.
    thankyou
  • Just FYI, we did implement our IPTC handling based on the IPTC standard not specifically an Adobe interpretation. But as the two agree, presumably Adobe did the same.
  • kyrd Member
    I am currently investigating with the author of the (imho excellent) software xnview.
    can you confirm that you're not using IPTC but XMP?
    actually I've been reading through zenphoto's core files and as far as i remember there were (a full array of) mentions of IPTC standard fields, but I'm not expert enough to deny the above assertion.
  • Well, there is a plugin that will support XMP, so if you have it enabled then we are using XMP as well as IPTC. Otherwise, no, we are not using XMP we are using IPTC.
  • kyrd Member
    aha, I actually do write as well an XMP info when I input data in the IPTC fields. that's a default behaviour of xnview, might be that there is a gap there which overwrites my IPTC data.
    in facts I don't know if it's normal that in the XMP data the `calle priuli ai cavaleti` is filed twice, being instead the sub-location and not the location.
    btw I tried to create metadata with no XMP enabled, but appearently nothing changed in this attempt
  • kyrd Member
    further investigating lead me to this point: the output in zenphoto is still the same, even if I use a fresh IPTC info file with no custom XMP data in it.
    here is the link to the page
    http://www.indirizzofantasma.net/zenphoto/numeri-civici/69/0069_noxmp_v2.jpg.php
    in the description there is the link to the .ipt file

    as I say in a previous post, I've noticed that the xmp data (first photo uploaded:http://www.indirizzofantasma.net/zenphoto/numeri-civici/69/0069.jpg.php) have twice the same value `calle priuli ai cavaleti` in 2 different fields, or am I wrong?

    photoshop:Location="calle priuli ai cavaleti"
    photoshop:State="VE"
    photoshop:Country="Italia"
    photoshop:City="Venezia"
    photoshop:Headline="69"
    Iptc4xmpCore:Location="calle priuli ai cavaleti"

    btw that was filled in as sublocation...
  • As I have said previously--the IPTC data that you have is what I quoted. I did not look for XMP data as you sait that it was the IPTC data that was not being displayed. Please note that those two things (IPTC and XMP) are different animals.

    If your tool is storing things in XMP then you will need the XMP Metadata plugin to retrieve them.
  • kyrd Member
    I know it's a minor detail, so thankyou for your patience! late night isn't always the best moment to realize things: I have not the xmpMetadata plugin enabled, nevertheless I have the same result with 2 different images and sets of data.
    I'll think about while going to venice today, have a nice day
  • kyrd Member
    I've been stuck into this for the past 2 days but now I think I'm going a step forward. I couldn't understand wether the problem was/is in the tool (xnview), the cms (zenphoto) or eventually on my side (unproper use of the two), so I've just downloaded and used another tool specific for managing metadata.
    as I'm not so confortable with command lines I ended up to use photome (www.photome.de).
    I've downloaded the test photo file (the same linked above: http://www.indirizzofantasma.net/zenphoto/albums/numeri-civici/69/0069.jpg = the uploaded original file, with IPTC & EXIF) and inspecting it with photome I get the following:

    [IPTC-NAA data (IIM)]
    Keyword: finestrata
    Content Location Name: Cannaregio
    Creator: Richard Khoury
    City: Venezia
    Location: calle priuli ai cavaleti
    Province/State: VE
    Country: Italia
    Headline: 69

    So the lost data/field was/is there!
    Maybe can help as additional information of the field which wasn't seen by zenphoto:
    Content Location Name: Cannaregio - Tag-ID: 2:027 - Tag Name: ContentLocationName

    At this point I guess the bug is more likely into zenphoto and I hope you can check if I'm wrong...
  • Zenphoto does not process all IPTC fields. `ContentLocationName` and `ContentLocationCode` are omitted. Use instead `Country-PrimaryLocationName` and `Country-PrimaryLocationCode`

    BTW, these also do not show up in Adobe Bridge.
  • kyrd Member
    ah, well, after a week and more of struggling now that makes sense, although I see it as an arbitrary limitation - doesn't matter what adobe says.
    also what you suggest unluckily is not a workable solution for me, as those fields are already used, besides I should change records to hundreds of files.

    I'm currently trying to work it out (trial&error system) to tweak the field I need to retrieve with another that zenphoto processes in zp-core/functions.php (yes, I know I shoudn't touch core files, but whenever I'll update zp I can re-tweak those files: I don't see any other chance now).
    I also know it's a naive way to code, so if anyone can help is welcome...
    e.g.
    `'IPTCOriginatingProgram' => array('IPTC', 'OriginatingProgram', gettext('Originating Program), false, 32),`
    change to
    `'IPTCContentLocName' => array('IPTC','ContentLocName', gettext('Conten Location Name - hacked), true, 32),`
  • You can ue the development build. There I have added those fields. There are two places needing changes. The table you cite and the place where the IPTC data is processed.
  • kyrd Member
    - don't shoot me I'm only the photographer -
    downloaded the last nightly build and tried to reupload its zp-core/functions.php in my installation...
    obviously it wasn't possible so I went back to the previous functions.php which I've edited by adding the 2 new lines with no visible effect
    (btw - the 2 lines are different from all others in that table, having 1 more false/true field at the end - is it normal?)
    however I've also succesfully sorted the order in a different way.
    place where the IPTC data is processed.
    but I don't know where or what to edit

    and also I lack knowledge on how to correctly run again a setup - I'll look for info and eventually post in another thread.

    apart of all this everything is fine and I see the light at the end of tunnel...
  • You cannot mix and match files. Install the complete development build. Anyway, this change will not be placed into the 1.4.2 stream since it requires database changes in order to save the new data.

    So it is up to you. Use the development build or work aroung the use of those fields. Just FYI, all the documentation I can find on the fields indicates that they are unique to a particular software. So my suggestion for portability is to use the "standard" fields. But of course that is up to you.
  • kyrd Member
    I see... I wasn't aware of the fact that those fields weren't "standard": learning is a never ending process...
    I might well consider to change pattern in the future. thankyou for the information.

    about the installing of the complete development build, this is a completely new issue: obviously I'm afraid to mess up the database and all the work done, but if I decide to reinstall and everything goes well from my side, will my issue be definitely solved?
  • I believe so. It does work for me with the image you posted. Of course, it does not solve any other application incompatibilities with that field. But it will at least show up in Zenphoto.

    The development build is fairly mature, but still a work in process. So it would be a good idea if you could install a test site first to confirm it works for you. It does work for me: www.sbillard.org is running the development build.
  • kyrd Member
    the development build installation was succesful, I've set the same customized theme and the wanted field happily shows.
    but as murphy says: every solution generates new problems, now the embedded keyword doesn't show anymore as a tag - in the previous installation the tags were directly generated from the embedded keywords (and for some unknown reason the keyword checklist was greyed out in the image options). I hope it's a minor problem.
    here http://www.indirizzofantasma.net/gallery/test/0069.jpg.php
  • The Keywords element in the field list selections should let you choose either "hide" or "do not process". "Show" is not available because of how the field is stored in the metadata. But if you have selected "hide" the keywords will be imported as Zenphoto tags. In your case the image is tagged with finestrat

    There was a time when the Kewords field was totally disabled. If that is the case for you, get the current nightly build version. (As said, this is still a work in process.)
Sign In or Register to comment.