Been trying to hack the XMP module to be able to parse out the xmp:Rating or the MicrosoftPhoto:Rating tag in the jpeg image to route it into the tags as (3Stars, 4Stars...etc), and have everything working, except the dang library won't pick up the XMP tag. I've heavily modified XMP module to make it much more stable and parse a lot more missing tags over the last 6 months. Fixed a bunch of bugs.
Anyway, let me know if anyone can help with this. Seems like this is the best way to get star ratings working short term...yeah, I could add the tags manually to the photos sorted by stars in WLPG, but that seems a bit extreme and could easily become "disjointed" from the actual star rating...
-Jeff
Posts: 225
Hi Jeff,
Glad to hear you've improved on the XMP module!
Could you explain that one a bit more? Or could you possibly post your work so that I could have a look at your implementation?
Thanks,
Tomek
----
Publish on Gallery 3 (WLPG Plugin) | XMP Module
Posts: 105
Yup. Tomek, I posted most of my changes (based on my JPG's trying to process) on the XMP Module thread. Never did see any response on trying to roll in the fixes/changes. I'll post an update of the work I'm trying to do to pick up the star rating from the <xmp:Rating> tag just recently. Appreciate any insight you have on the library JPEG module (I've had similar frustration getting it to pick up Microsoft Photo tags. Let me get the code when I get home...
Jeff
Posts: 225
Oops. Sorry about that. I think at the time I put it in the back of my head to update, and then never got around to it. Sigh. I'll carve out some time this weekend at the latest to finally look through all that! Thanks.
Tomek
PS. Have you ever used Fossil for your version control? I'm growing to quite like it and am thinking of putting it on my site with the two projects as two repositories.
----
Publish on Gallery 3 (WLPG Plugin) | XMP Module
Posts: 105
Here is a zip of all the latest changes. Don't think I've broken the face tags, but not sure, as I don't use those. The "rating" sub call in the xmp.php file is where I started trying to have it fold in the star ratings to a tag...it all works, except it wont capture the jpg parse...
Jeff
Posts: 225
Jeff,
I've merged most of your changes into the original code -- thanks for the updates to the xmp re-reading task. You can see the code and repository here: http://kott.fm/cgi-bin/fossil/xmp/home. This is a fossil repository.
The problem with finding the ratings was one of the two following things:
1) You were looking at "http://ns.adobe.com/xap/1.0/\x00" where you should have been looking at "http://ns.adobe.com/xap/1.0/"
2) OR, you needed Image_JpegXmpReader::MARKER_NS instead of MARKER_NS.
I'm not sure because I changes some things around to not have to modify the JpegXMPReader class at all. You can take a look at all the code changes by browsing the timeline (linked above). You will need to log in as an anonymous user to see the links.
The newest version is attached. If it works on all your test pictures, let me know, and I'll merge it with the trunk and release it!
Tomek
----
Publish on Gallery 3 (WLPG Plugin) | XMP Module
Posts: 105
Thanks, Tomek.
I'm going to give that a shot right now. I suspect it was creating the local const definitions, as I had already tried changing the values (temporarily) in JpegXmpReader for the \x00 with no help. Next on the list (if this works) is probably helping to get me back on track parsing a LOT of things...namely, trying to see if I can get it to parse the WLPG "Geo Tag" places and put those into tags too! Yay! Will let you know how your edits go.
-JM
Posts: 225
Out of curiosity, is there a reason you don't want to use EXIF-GPS for that? I set the GPS coordinates in WLPG and they seem to be interpreted fine by that!
Tomek
----
Publish on Gallery 3 (WLPG Plugin) | XMP Module
Posts: 105
Yeah, no, that is fine, I just thought WLPG interpreted the GPS location and put a nearby city/state/country tag on the photo (only because it seems to take WLPG a LONG time to have it updated the first time you tag a bunch of photos, but then it is always there). But I guess, it could be doing the Geo location dynamic from the GPS location every time? Hum. Well, then we need a module in Gallery 3 that does the same interpolation of the GPS to city that WLPG does.
Posts: 105
ok...now I probably want to add the year and month to the tag creation process to make it a searchable/filter option...grin.
Posts: 225
Does that mean that the current version works?
I think I need to develop an admin page that allows you to pick and choose which XMP items are scanned -- so that you can get the date and star information in tags, while I don't care about those, so I won't
Tomek
----
Publish on Gallery 3 (WLPG Plugin) | XMP Module
Posts: 105
Sorry, yes. It works great with my additions and with your fixes to the const XMP scan strings. Thanks!