Kurt, that's technically incorrect about what you say about the clipboard. The clipboard is not holding just a raw set of bytes but it also includes the type of the data along with it. And usually, the clipboard contains several representations of the same data (called flavors), e.g. for images, it may contain the data in TIFF, JPG and PNG format. Well, more precisely, it usually only contains one of them (but it may contain more), and if an app requests the data, it can request it in one of the other formats and the clipboard will automatically convert the data accordingly.
Same for text content in a clipboard: There's always a plain text representation but there may also be styled (rich) text, even PDF, representations of it, and you can pick out whichever you prefer.
In other words, the Clipboard DOES know the type of data it holds, and can convert it if needed due to that fact.
To see all the flavors in the clipboard, use this AppleScript line:
get the clipboardasrecord
In fact, it might even be possible to use the Clipboard for image conversion operations, though it'd overwrite the current clipboard contents, and one cannot easily preserve and restore them, AFAIK, using AppleScript. On the OS framework programming level (e.g. Cocoa), there are parallel Pasteboards that could be used for this without disturbing the user's clipboard, but that's not available through default AppleScript APIs. ... Giving this some more thought, though, it seems one cannot use the Clipboard for img conversion just because there's no way to load the contents of a file into the clipboard and vice versa. Or does someone know a way?