We’re assuming that you’ve explored the Image Metadata Gramplet add-on.
Even if it doesn’t do all that you want, it is good sample code to build upon.
And I like using the added features in @cdhorn 's experimental LinkedView modes in combination with such metadata add-ons.