I am generating a RTF file from Python 2.1 with Zope 2.4, using the "Rich Text Format (RTF) Version 1.6 Specification" (http://msdn.microsoft.com/library/specs/rtfspec.htm).
But I can not include a "jpg" image in the RTF file. For including the "jpg" image file, firstly, I have obtainted the hexadecimal representation of the image with Image.encode("hex") from PIL library:
Import Image
img = Image.open("photo.jpg")
file = open("filename","wb")
However, this hexadecimal representation is no good, because when, for example, I save the same image with Microsoft Word in RTF format, these representations no match.
Anybody can help me ?
Thank you very much.

Reply via email to