Hi,
this is rather urgent:
I try to write iptc information to an existing image without having to open and recompress the jpg data when writing.
What I do is this:
* start with new image
imgx.JPGMarkersToSave = hex2dec("1000")
imgx.import.fromnew(1,1)
imgx.image.iptc.PopulateStandardTags()
imgx.image.iptc.SaveIPTCChanges = .T.
* create iptc data
imgx.image.iptc.add(ixitCaptionWriter)
imgx.image.iptc.item(ixitCaptionWriter,0).text = "myapplication"
imgx.image.iptc.add(ixitCaption)
imgx.image.iptc.item(ixitCaption,0).text = "images.caption"
...
* save iptc to temp file
imgx.export.tofile(tempfile,ixfsJPG)
* copy iptc from temp file to original file
imgx.image.CopyJPEGMetadataToFile(tempfile,existingfile)
In words: start a new image, write iptc data to it, save it as a temp image, and then use CopyJPEGMetadataToFile to transfer the data to an existing file.
The problem is, that the image data is also transferred. When I open the existing image, it has size 1x1, like the new image I used.
How do I achieve what I want to do? That is, write iptc data to an image without ever opening or recompressing the jpg data? I have to update an archive of > 150000 images, up to 100MB uncompressed in size each. Opening all this files just for the iptc would take ages...