I am not surprised that it doesn't work with images. If you want to play around with it, open up Applescript Editor, and run
Code: Select all
the clipboard as record
after copying some RTF content with images.
It looks like the relevant chunk of data is in an RTFD class instead of an RTF class. So the first modification to the script above would be to ask for class RTFD instead of class RTF.
If you do that, the bit of perl in the script more or less decodes the RTFD data, enough so that you can tell more or less what it is supposed to be: a chunk of RTF text with a reference to an image, followed by the image itself in some sort of embedded format. Ordinary RTFD files on OS X are folders containing some RTF and the associated image files.
So getting this to work with images means (a) finding a reliable way to decode the chunk of RTFD data that the applescript gives you (perhaps just chopping off the image data?) and (b) working out a way of getting it into a form that textutil can recognize and convert.
This is all beyond me!