ZenPhoto renames my images without my permission

Hey!

This was driving me nuts. I tried to report it but my account here became blocked. Since then I ran
Refresh Metadata
Refresh the Database
probably one of which fixed it, but I'll report it anyway in case it happens again.

---

Within the Real Estate album I have two sub-albums, each one corresponds to a house:
- House of Karin L
- House of Karin and Marcel

http://londonlight.org/zp/Real-Estate

Each of these has images for each section of the house. Both have an image called "Kitchen", and both have an image called "Living Room". I set their title from within the ZP admin panel: http://i.imgur.com/SRcrMJB.png

Now this is crazy. Whenever I set the name of the living room photo of one house to "Living Room" and click [Apply], the living room photo in the other house gets changed to what you can see as "Image title" in the "Metadata" div in the screenshot above!
I don't even know why ZenPhoto insists on using that as the image title since the image has no title, and what ZenPhoto shows as the metadata title is actually the caption. So here it is for one of them:
`
exiftool -G -s -a -m -u -args pano 97 - 2014-04-10 realty karin - 04.jpg
-File:Comment=ASCII Kolor stitching | 7 pictures | Size: 9200 x 4600 | Lens: Fisheye | RMS: 2.87 | FOV: 360.00 x 180.00 ~ 0.00 | Projection: Spherical | Color: LDR |
`
When I change this back to "Living Room" and click [Apply], then ZenPhoto renames the living room photo in the other album to its caption (which it also incorrectly uses as the title!)!

ZenPhoto SHOULD NOT, MAY NOT change an image's title behind the administrator's back!

I have no issue with the "Kitchen" images, just with the "Living Room" ones!

Zenphoto version 1.4.6 [bbddab7675] (Official build)
Current locale setting: en_US.UTF8
Current gallery theme: Gold
PHP version: 5.4.29
Graphics support: PHP GD library bundled (2.1.0 compatible)
MySQLi version: 5.5.37

Comments

  • acrylian Administrator, Developer
    Zenphoto really does not rename images in other albums … Besides you have no images here but a text object on the screenshot. Those have no metadata of course.

    Info on the general meta data mapping is here: http://www.zenphoto.org/news/zenphoto-image-metadata-processing
    There are cameras that apparently don't follow the EXIF standard but we do. So on some the usage is wrong and therefore wrong fetched.

    How is the exact structure of those albums?
  • `Zenphoto really does not rename images in other albums`
    ZenPhoto really did keep renaming those two images, each one in a separate album.

    `Besides you have no images here but a text object on the screenshot.`
    Yes these are text objects but they are treated as images:
    http://i.imgur.com/bK10AC1.png
    Every text file has an accompanying JPEG (and an XML but that has nothing to do with ZenPhoto).

    Folder structure:
    http://i.imgur.com/46vRazR.png

    Both exiv2 and exiftool show that the "Kolor stitching (...)" text is a comment/description, not a title as ZenPhoto uses it.
    `
    exiftool -G -s -a -m -u -args Living\ Room.jpg | grep stitching
    -EXIF:ImageDescription=ASCII Kolor stitching | 7 pictures | Size: 9200 x 4600 | Lens: Fisheye | RMS: 2.87 | FOV: 360.00 x 180.00 ~ 0.00 | Projection: Spherical | Color: LDR |
    -EXIF:UserComment=ASCII Kolor stitching | 7 pictures | Size: 9200 x 4600 | Lens: Fisheye | RMS: 2.87 | FOV: 360.00 x 180.00 ~ 0.00 | Projection: Spherical | Color: LDR |&\#xa;Projection: Panini General (19)&\#xa;FOV: 160 x 87&\#xa;Ev: 9.92

    exiv2 -pa Living\ Room.jpg | grep stitching
    Exif.Image.ImageDescription Ascii 154 ASCII Kolor stitching | 7 pictures | Size: 9200 x 4600 | Lens: Fisheye | RMS: 2.87 | FOV: 360.00 x 180.00 ~ 0.00 | Projection: Spherical | Color: LDR |
    `
    `Info on the general meta data mapping is here: http://www.zenphoto.org/news/zenphoto-image-metadata-processing`
    and
    `One other source of confusion is the unfortunate naming of the EXIF "title" field. According to the EXIF specification this is the "image description". Zenphoto honors the definition of the field.`
    Perhaps this is the problem. I will experiment with this and get back to you.
  • I tested now and these are the results:
    `
    exiftool -G -s -a -m -u -args Living\ Room.jpg | grep "This is the caption"
    -File:Comment=This is the caption text.
    -EXIF:ImageDescription=This is the caption text.
    -EXIF:UserComment=This is the caption text.
    -XMP:Description=This is the caption text.
    -XMP:ImageDescription=This is the caption text.
    -XMP:UserComment=This is the caption text.
    -IPTC:Caption-Abstract=This is the caption text.

    exiftool -G -s -a -m -u -args Living\ Room.jpg | grep "This is the title"
    -XMP:Title=This is the title.
    -IPTC:ObjectName=This is the title.

    exiv2 -pa Living\ Room.jpg | grep "This is the title"
    Iptc.Application2.ObjectName String 18 This is the title.
    Xmp.dc.title LangAlt 1 lang="x-default" This is the title.

    exiv2 -pa Living\ Room.jpg | grep "This is the caption"
    Exif.Image.ImageDescription Ascii 26 This is the caption text.
    Exif.Photo.UserComment Undefined 33 This is the caption text.
    Iptc.Application2.Caption String 25 This is the caption text.
    Xmp.dc.description LangAlt 1 lang="x-default" This is the caption text.
    Xmp.tiff.ImageDescription LangAlt 1 lang="x-default" This is the caption text.
    Xmp.exif.UserComment LangAlt 1 lang="x-default" This is the caption text.
    `
    It seems that the workaround to avoid the incorrect title is to disable the Exif ImageDescription field, then ZenPhoto should use the IPTC ObjectName field, or the XMP Title field.

    By the way, that ZenPhoto metadata documentation page does not list Exif as a source for "Zenphoto title", so either that documentation page is incomplete, or ZenPhoto is incorrectly using the IPTC:Caption-Abstract field for the title.
  • By the way 2: if you want to stick to the spec, then you should spell it "Exif" ;]

  • Description [IPTC Core]
    The Description field, often referred to as “Caption,” should report the who, what and why of what the photograph depicts. If there is a person or people in the image, this caption might include their names, and/or their roles in any action taking place. If the image depicts a location, then it should describe the location. Don’t forget to also include this same “geographical” information in the appropriate fields (location, city, state/province, country) of the IPTC Core. The amount of detail to include depends on the image and whether it is documentary or conceptual. Typically, editorial images come with complete caption text, while advertising images may not.

    This is extracted from the EXIF specification. "Caption" is equivalent to the Zenphoto title, thus that is where this data is stored. If you do not want this you should disable the description field processing as you state in your "workaround".
  • acrylian Administrator, Developer
    @LondonLight.org:
    By the way 2: if you want to stick to the spec, then you should spell it "Exif" ;]
    We don't want to get too picky, do we? ;-)

    If two images are retitled for you it is really strange. But I don't see how this can happen nor was it ever reported before.
  • I think the renaming of the titles was the result of some database mishmash as refreshing it fixed the problem. I will get back to you if it happens again.

    CIPA DC- 008-Translation- 2012
    `
    „ ImageDescription
    A character string giving the title of the image. It is possible to be added a comment such as "1988
    company picnic" or the like. Two-byte character codes cannot be used. When a 2-byte code is
    necessary, the Exif Private tag UserComment is to be used.
    Tag = 270 (10E.H)
    Type = ASCII
    Count = Any
    Default = None
    `
    How unfortunate!
    I will contact the developers of the other software and point this out.

    The ZenPhoto metadata documentation page should be updated with the missing Exif info for the image title as I explained above.
  • acrylian Administrator, Developer
    That could be the reason, a wrong internal id. When for example the image was first and then the .txt came later.

    Just a thought: If you work on things that includes file system like renaming files I would recommend to close the site while doing so (there is a plugin). If a second before you rename the image to the txt it may be recognised as an image itself so get its own entry. That is a small drawback being file system based I guess.
  • Thank you for pointing this out. I don't rename the images to .txt, what I do is I upload a zip into the album folder, that zip contains the .jpg, .txt and .xml files (and a thousand small JPG files in a subfolder which I never publish, they are used by the panorama viewer), and then I unpack the zip either from CPanel or via SSH as that is much faster than uploading the individual files. Is that safe?
  • acrylian Administrator, Developer
    Your structure should actually be fine. I would do it the same way probably. .txt (or other media items) with a thumb image are meant to be stored that way, too.

    I was referring to the rare case if you maybe decide the txt file name should be "room1.txt" instead of "room2.txt" but also have a thumb image "room2.jpg". If someone visits the site in exactly the moment the two names don't match there is technically a chance that the image is added as itself. If the server delays the file operation or something.
  • Update and conclusions:
    1- "The Exiv2 library provides the facilities to read/write/modify/add/delete tags in Exif, XMP and IPTC. The exact meaning of the tags is not of concern to the library." - Robin Mills, Exiv2 dev and ex Adobe dev.
    2- There is no single Exif standard. Saying ZenPhoto follows "the" standard is ambiguous. Maybe it's time to follow a better standard.
    3- The JEITA and CIPA specs (both Japanese) say to use the ImageDescription field for the image title. This is stupid and in conflict with what the Metadata Working Group's spec says.
    4- The Metadata Working Group's spec states, "<Description> defines the textual description of a resource's content. Also known as "user comment”, "caption”, "abstract” or "description”. Exif ImageDescription, IPTC Caption, and XMP (dc:description) are mapped together." This makes far more sense.
    http://metadataworkinggroup.org/pdf/mwg_guidance.pdf page 36.
    4- The largest names in the industry (Photoshop, Lightroom, Bridge, Picasa, iPhoto) are not consistent in where they store the title and description. More importantly, none of them use Exif.Image.ImageDescription.

    See http://dev.exiv2.org/issues/985

    ZenPhoto should avoid using Exif.Image.ImageDescription if any of the other tags are present since this tag's purpose is disputed.
    Setting the image name based on that field has and will cause trouble:
    http://www.zenphoto.org/support/topic.php?id=9347
    http://www.zenphoto.org/support/topic.php?id=7341
    etc.
  • acrylian Administrator, Developer
    Thanks for the investigation. I am not a photographer so I never used metadata extensively. I have used Photoshop and Bridge to set title, description and tags which always worked well for me.

    I notice that the link to the EXIF spec in our article is broken. I quickly found this (according to tiffs) http://www.media.mit.edu/pia/Research/deepview/exif.html
    Here the description field is labeled as "describes image".

    Since I don't use it myself actually I am all in changing behaviour if it doesn't break anything. But I would like to see more (newer) opinions from users using this before doing that.

    In any case best you open a ticket.
  • The Japanese specs are illogical about that tag ("Keep coffee in the tea jar and you're wrong if you think otherwise because the spec we wrote says so") and in conflict with the MWG (which is logical), unfortunately both have been adopted by various programs so there will be a problem no matter which way you go, which is why it's best for ZenPhoto to do what it can to not use this tag in a default installation and rely on IPTC/XMP if available.

    Could you open a ticket on my behalf if one is required?
  • unfortunately both have been adopted by various programs so there will be a problem no matter which way you go...
    Which is why there is an option to prevent using that (or any other) metadata field. Wasn't that your original solution of 4 months ago?
  • Wasn't your solution to ignore the problem 3 years ago?

    As you correctly noted, I have had a workaround for my needs for four months. However, to help the ZenPhoto project and to help other users, I took the time to dig deeper and uncover the problem.
    Again: the default installation of ZenPhoto (and ZenPhoto20) should use either Iptc.Application2.ObjectName or Xmp.dc.title, if available, to set the image titles. Using any other tag will lead to broken behavior for some users.

    The ball's is in your court, I'm done.
  • I am somewhat confused. You seem to imply that zenphoto and zenphoto20 do not use the IPTC objeced name or the XMP title if available.

    The code that actually sets the title reads:
    `
    /* iptc title */
    $title = $this->get('IPTCObjectName');
    if (empty($title)) {
    $title = $this->get('IPTCImageHeadline');
    }
    //EXIF title [sic]
    if (empty($title)) {
    $title = $this->get('EXIFDescription');
    }
    if (!empty($title)) {
    $this->setTitle($title);
    }
    `
    XMP fields are mapped into the appropriate IPTC or EXIF fields if that plugin is enabled. In particular, `` maps to `IPTCObjectName`.

    So what exactly do you think is wrong with zenphoto? Is it that it will use the `EXIFDescription` field if the more preferred fields are absent? That may be appropriate for you, but not necessarily for others who have stored their titles in this field as per the specification.
Sign In or Register to comment.