[fpc-pascal] Editing XMP data in images
Bernd
prof7bit at gmail.com
Mon Oct 1 23:38:29 CEST 2012
2012/10/1 Mattias Gaertner <nc-gaertnma at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exiftool.pas
Type: application/octet-stream
Size: 6505 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20121001/4a636217/attachment.obj>
More information about the fpc-pascal
mailing list