Question
Exif writing error?
Hi.
To start out, I'm a scripting newbie, so I apologize if this is something stupid or obvious.
I'm writing a script that allows me to export my ratings to the IPTC Core Keywords field (which I have working successfully), or to the EXIF data as part of the User Comment field. Basically, I'm pushing a string like "3_stars" onto the end of the field, so my ratings are portable across many applications.
So it *seems* to run fine, but when I try to view the modified image in Bridge, the Metadata/Keywords panel just has an eternally rotating "working" icon. When I right click on the image, and view File Info... > Advanced, the EXIF has the correct data in it.
The relevant portion of my code looks like:
Am I doing something boneheaded?
(For reference, I'm running Bridge 1.0.3.107 (99784) under Windows 2000)
To start out, I'm a scripting newbie, so I apologize if this is something stupid or obvious.
I'm writing a script that allows me to export my ratings to the IPTC Core Keywords field (which I have working successfully), or to the EXIF data as part of the User Comment field. Basically, I'm pushing a string like "3_stars" onto the end of the field, so my ratings are portable across many applications.
So it *seems* to run fine, but when I try to view the modified image in Bridge, the Metadata/Keywords panel just has an eternally rotating "working" icon. When I right click on the image, and view File Info... > Advanced, the EXIF has the correct data in it.
The relevant portion of my code looks like:
if (thisThumb.type == 'file')
{
var src_meta = thisThumb.metadata
src_meta.namespace = "http://ns.adobe.com/xap/1.0/";
if (src_meta.Rating)
{
// create rating string
if (src_meta.Rating != '1')
{
rating = src_meta.Rating + '_stars';
}
else
{
rating = '1_star';
}
src_meta.namespace = "http://ns.adobe.com/exif/1.0/";
uc = src_meta.UserComment;
// remove old rating, if one exists
if (uc)
{
uc = uc.replace(/\d_star(s)*/,'');
}
// update EXIF
src_meta.UserComment = uc + ' ' + rating;
}
}
Am I doing something boneheaded?
(For reference, I'm running Bridge 1.0.3.107 (99784) under Windows 2000)
