Save as JPEG is not built in
You have to use third party controls or a type library someone else has made to do it.
As far as reading a user defined image format, thats easy as long as you are given details on the structures used and how they work. If you're just given a lump of data, you'd have to be lucky or have a good background in image formats to recognize it.
You might need to provide more info on the UDT to get a meaningful reply. If you want a link to the JPG type library I have found useful, try http://vbaccelerator.com/codelib/gfx/vbjpeg.htm
Regards
Paul Lewis