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-EstateEach 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.pngNow 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
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 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.
`
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.
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.
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.
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.
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.
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.
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.
Could you open a ticket on my behalf if one is required?
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.
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.