Any way to use the Exif UserComment field

Hi,

I'm using the UserComment field to store visibility info about my photo (is it public or password protected). I'm trying to get zenphoto to pick up the UserComment exif field from my photos, but I can't get it do do so.

I've added the field to the $_zp_exifvars array in the functiuns.php file:
`'EXIFUserComment' => array('SubIFD', 'UserComment', gettext('User Comment'), true, 128),`

The column gets created in the DB during setup but it is always empty, zenphoto can't read the field from the photos.

I've noticed that the UserComment part of exif.php is actually commented out (line 650):
`
//case "9286": //UserComment
// $encoding = rtrim(substr($data, 0, 8));
// $data = rtrim(substr($data, 8));
// break;
`
Is there any known issue about that?

Thanks,
Matt

Comments

  • This is all inherited code so I do not know why that is commented out. Please do give it a try to enable it. If you get it working let us know the changes (preferably with at feature ticket) and we will incorporate it. Attach an image with such a comment for our testing.
  • Hi Stephen,

    I tried un-commenting the piece of code but no luck.

    Fortunately I have the Exif:UserComment fieled duplicated in the IPTC:SpecialInstructions field, and I was able to get zenPhoto pick this one up. I added the following to the functions.php (Note that for some reason the Metadata Key is SpecialInstru):
    `'IPTCSpecialInstructions' => array('IPTC', 'SpecialInstru', gettext('Special Instructions'), true, 256),`

    Then I added a couple lines to the updateMetaData() function in class-image.php:
    `
    /* set show with info from IPTC special instructions */
    $this->setShow($this->get('IPTCSpecialInstructions')=='visibility:public');
    `
    This will make any photo visible by default if the IPTC:SpecialInstructions field matches 'visibility:public' and will make any other non-visible.
  • acrylian Administrator, Developer
    Please be a little patient as Stephen is away until next week und I am not familiar with the EXIF stuff.
  • please create a ticket with this information and attach an image with such an IPTC field.
Sign In or Register to comment.