The problem cannot be solved "perfectly" in Java.
1) if you convert to MIME, you will ruin the text of the original Notes. MIME allows only a rough approximation of the original content; it may or may not matter.
If that matters, you can convert a copy of the original field to MIME, used only for display purposes, or clear it with DXL and save it separately - however, this approach again means a synchronization problem every time someone changes the image in the original RT element.
2) the calculation of the URL in accordance with the OP code in the accepted self-answer is generally impossible, since the constant 0.C4 in this example refers to the image offset in the binary data of the RT element. Any other rich text field design makes sense, manually entered images created using another version of Notes - all this affects the offset.
3) The URL can only be correctly calculated using the C API, which allows you to examine binary data in an extended text element. This is not possible with Java. IMO (without creating JNI bridges, etc.)
source share