In a recent Notes Client development I had the need to programmatically detach images inserted into a Notes Document. The images also needed to be visible in the Notes Client rather than added as attachments. But an image pasted into a Rich Text field is not accessible via NotesRichTextItem.EmbeddedObjects. There was also the challenge that for some configuration documents I needed to use specific images for specific purposes, but I didn’t know in advance the programmatic name of the attachment.
What seemed to be the obvious solution was Rich Text Lite fields set to only allow Thumbnails. Despite the name, thumbnails don’t have to be a specific size. The field allows you to programmatically set the size, but if you don’t specify the size, the image remains the original size. However, you do specify a specific filename and the image, though visible, is stored as an embedded object. So you can easily programmatically retrieve it.
That worked great, except the Notes Client version my end users had seemed to keep adding a black line at the top. Once we confirmed it wasn’t related to the source of the image, I did some Googling, and located this issue for 8.0.2: LO44309: BLACK LINE APPEARS AT THE TOP OF IMAGE IN CONTACTS AFTER USER CL ICKS SAVE AND CLOSE 3-4 TIMES
My users were using 8.0.1 and were not resizing the image, but the symptoms were the same. The local fix is not a reasonable option. Note also the comments and priority.
More searching also found another APAR for 8.5.1: LO49618: NAB: EDIT/SAVE CAUSES A GROWING BLACK BAR IN CONTACT PHOTO. In my case also there was no resizing of the image, just editing and saving. Put that in a Person document in the NAB and it becomes higher priority and gets fixed in the very next point release, 8.5.2. The comparison of the two identifies how to raise a similar PMR with a better chance of getting a fix.
Unfortunately upgrade isn’t an option for my scenario, as much as it would be my recommended approach. Fortunately I found alternative code to extract embedded images in Notes Documents via DXL, although it doesn’t allow you to easily identify metadata for an image.
Hi Paul, I looked your article and I have similar issue, I need to read embbeded images (not downloa).
I am new in programming for Lotus Notes, and I wonder if you can share with me the piece of code to read embbeded images? thanks in advance. Gustavo Leal