2012/10/1 Mattias Gaertner <nc-gaert...@netcologne.de>: > Hi, > > I need to edit XMP data in images (at least tif, jpg).
If you need some quick and dirty solution then I have something here that will one day become part of an application to tag and organize jpeg images from digital cameras. It will start a separate exiftool process (in stay_open mode so it won't need to be restarted for every image, it keeps running as long as my program runs and I call it "quick and dirty" because I did not want to make a binding to some C library, I simply took the easy way) and exiftool is well tested and can be trusted to write my original jpeg images with any danger of corrupting them). The attached code does not yet implement all needed commands, it will only read thumbnails and read xmp keywords and exif keywords but writing will be equally simple. Commands will be enqueued along with a callback method to call back (via QueueAsyncCall because the other code that started it and wants to receive the results is in the GUI) when the job is done. Simply create an instance of TExifTool and call its methods. Implement more descendants of TExifQueuedJob that fit your needs and methods in TExifTool to use them. See attachment for the code. License (in this half finished state it is now) is public domain.
exiftool.pas
Description: Binary data
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal