Option b) Go through the file system - write a temporary file and load it via a PDB call.
(b) is the probably the simplest, but I am not happy about going to the file system and all the issues it brings.
I wouldn't be too shy about it. The jpeg plugin itself (last I saw) does a similar thing when in 'preview' mode. Whatever works!
--Adam