Extracting images from a RTF

I have a database that has several hundred documents. One of the fields in a document is a RTF called Image. They have pasted images into this field (one image per document ann JPGs) and now they want these images saved to individual JPG files on the local drive. Based on the document name we would assign a name to each file written. I can’t seem to figure out how to do this in LS.

Any Help would be appreciated.

Subject: Extracting images from a RTF

Honestly? Talk to Ben about Midas. Natively (without delving into the C API or knowing anything about Notes bitmaps), you can easily get GIFs through DXL encoded Base64 and decode using a NotesMIMEEntity, but JPEGs not so much.

Subject: RE: Extracting images from a RTF

With Midas, you would use the ExportGraphic method which makes this pretty easy.

Subject: RE: Extracting images from a RTF

Problem is that this is a one time thing on a couple hundred documents.

Subject: RE: Extracting images from a RTF

Well, you could take a look at Normunds Kalnberzins’ rtLib, which is basically a script library that makes extensive use of the C API – but I think it’s restricted to exporting embedded images in their native/imported format (that is, I haven’t found a method for image format conversion). You may be able to get away with the free download to do a one-time export in a sandbox environment – you’d need to do that to evaluate anyway. If it’s ongoing, and does what you want, the license is fairly cheap.

Subject: RE: Extracting images from a RTF

Another approach would be to open the documents from a browser, right click and save them. Sometimes that is the easiest approach if you don’t have too many documents.